List of usage examples for org.apache.commons.lang StringUtils lowerCase
public static String lowerCase(String str)
Converts a String to lower case as per String#toLowerCase() .
From source file:com.ms.app.web.commons.utils.DeviceUtils.java
/** * ?UA??/*w w w . j a v a 2 s . c om*/ * * @param ua * @return :0 ():1 */ public static int getDeviceByUa(String ua) { if (StringUtils.isBlank(ua)) { return 1; } ua = StringUtils.lowerCase(ua); // ? if (StringUtils.indexOfAny(ua, DEVICES) < 0) { return 1; } return 0; }
From source file:com.enonic.cms.core.search.builder.ExpressionValueResolver.java
public static Object toValue(final ValueExpr expr) { if (expr.isNumber()) { return expr.getValue(); } else {//from ww w.j a va 2 s .com final String stringValue = expr.getValue().toString(); return StringUtils.lowerCase(stringValue); } }
From source file:com.l1j5.web.common.utils.ImageUtils.java
public static void createThumbnail(BufferedInputStream stream_file, String save, String type, int w, int h) { try {//from w w w .ja v a 2 s . com if (StringUtils.equals(StringUtils.lowerCase(type), "gif")) { getGifImageThumbnail(stream_file, save, type, w, h); } else { getImageThumbnail(stream_file, save, type, w, h); } } catch (Exception e) { log.error(e); } }
From source file:com.pinterest.arcee.bean.AutoScalingTerminationPolicy.java
@JsonCreator public static AutoScalingTerminationPolicy forValue(String value) { return namesMap.get(StringUtils.lowerCase(value)); }
From source file:com.enonic.cms.core.search.builder.ContentIndexOrderbyValueResolver.java
private static String getOrderbyValueForString(String value) { return StringUtils.lowerCase(value); }
From source file:com.safetys.framework.jmesa.core.filter.StringFilterMatcher.java
public boolean evaluate(Object itemValue, String filterValue) { String item = StringUtils.lowerCase(String.valueOf(itemValue)); String filter = StringUtils.lowerCase(String.valueOf(filterValue)); if (StringUtils.contains(item, filter)) { return true; }//from w ww . j a va 2s.c om return false; }
From source file:com.evolveum.midpoint.common.Utils.java
public static String getPropertyName(String name) { if (null == name) { return ""; }// w ww .j a va2s . co m return StringUtils.lowerCase(name); }
From source file:com.discursive.jccook.xml.bean.LowerRule.java
public void body(String namespace, String name, String text) throws Exception { Message message = (Message) digester.getRoot(); String lower = StringUtils.lowerCase(message.getText()); message.setText(lower);//from w ww. ja v a2s.com }
From source file:com.edm.app.auth.Auth.java
public static void robot(String robotPath) { BufferedReader reader = null; try {/*from ww w . j a v a2 s. c o m*/ reader = new BufferedReader(new InputStreamReader(new FileInputStream(robotPath), "UTF-8")); String line = null; while ((line = reader.readLine()) != null) { if (StringUtils.isBlank(line)) { continue; } String key = StringUtils.substringBefore(line, "="); String val = StringUtils.substringAfter(line, "="); boolean r = StringUtils.equals(md5.encode(StringUtils.upperCase(key)), "cebb21b542877339c40e7e8ecc96796e"); if (StringUtils.isNotBlank(key) && r) { if (StringUtils.isNotBlank(val)) { ROBOT = StringUtils.lowerCase(val); break; } } } } catch (Exception e) { logger.error("(Auth:robot) error: ", e); } finally { try { if (reader != null) { reader.close(); } } catch (IOException e) { } } }
From source file:com.capgemini.b2bassets.storefront.controllers.cms.AbstractAcceleratorCMSComponentController.java
@Override protected String getView(final T component) { // build a jsp response based on the component type return ControllerConstants.Views.Cms.ComponentPrefix + StringUtils.lowerCase(getTypeCode(component)); }