List of usage examples for java.lang String toLowerCase
public String toLowerCase()
From source file:lsafunctions.LSA.java
private static HashMap addToDicry(String[] listLema1, HashMap dicry, int i) { for (String item : listLema1) { if (!dicry.containsValue(item.toLowerCase())) { dicry.put(i, item.toLowerCase()); i++;/*from www . j a v a 2s . c o m*/ } } return dicry; }
From source file:net.duckling.ddl.util.ResourceQueryKeywordUtil.java
private static void setMap(String key, String value, Map<String, Object> param) { if (param != null) { param.put(key, "%" + value.toLowerCase() + "%"); }//from www . j av a 2 s. c om }
From source file:Main.java
/** * A double check about app signature that was passed by MainActivity as facetID. * @param facetId a string value composed by app hash. I.e. android:apk-key-hash:Lir5oIjf552K/XN4bTul0VS3GfM * @param context Application Context/*from w w w . j a v a 2 s .c om*/ * @return true if the signature executed on runtime matches if signature sent by MainActivity */ private static boolean checkAppSignature(String facetId, Context context) { try { PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES); for (Signature sign : packageInfo.signatures) { byte[] sB = sign.toByteArray(); MessageDigest messageDigest = MessageDigest.getInstance("SHA1"); messageDigest.update(sign.toByteArray()); String currentSignature = Base64.encodeToString(messageDigest.digest(), Base64.DEFAULT); if (currentSignature.toLowerCase().contains(facetId.split(":")[2].toLowerCase())) { return true; } } } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return false; }
From source file:com.thoughtworks.go.util.StringUtil.java
public static String humanize(String s) { String[] strings = StringUtils.splitByCharacterTypeCamelCase(s); for (int i = 0; i < strings.length; i++) { String string = strings[i]; strings[i] = string.toLowerCase(); }/*from w w w.j a va2s. c om*/ return StringUtils.join(strings, " "); }
From source file:net.duckling.ddl.util.FileTypeUtils.java
public static boolean isClbDealImage(String fileName) { if (StringUtils.isEmpty(fileName)) { return false; }//from w w w .jav a 2s . c o m String f = fileName.toLowerCase(); for (String suffix : pictureSuffix) { if (f.endsWith(suffix)) { return true; } } return false; }
From source file:Main.java
public static int mpHash(String input) { int hash = 0; if (input == null || input.length() == 0) return hash; char[] chars = input.toLowerCase().toCharArray(); for (char c : chars) { hash = ((hash << 5) - hash) + c; }/*from ww w . j a v a 2 s .c om*/ return hash; }
From source file:org.cloudfoundry.identity.uaa.user.UaaAuthority.java
public static UaaAuthority fromAuthorities(String authorities) { String type = authorities == null ? "uaa.user" : authorities.toLowerCase(); return type.contains("uaa.admin") ? UAA_ADMIN : UAA_USER; }
From source file:apps.provisioning.util.Utils.java
/** * Replaces special characters to e-mail valid characters. * * @param username User name to be formatted. * @return Formatted text// w ww .j a va 2 s. c om */ public static String replaceSpecialChars(String username) { if (username == null) { return null; } username = username.toLowerCase(); // Replaces characters with accents for the same characters without accents. username = StringUtils.stripAccents(username); // Filters e-mail valid characters username = username.replaceAll(REGEXP_SPECIAL_CHARS, ""); // The maximum Google Apps username length is 60 characters if (username.length() > USERNAME_MAX_LENGTH) { username = username.substring(0, USERNAME_MAX_LENGTH); } return username; }
From source file:gov.nih.nci.cabig.caaers.utils.JSONUtils.java
public static Map<String, Object> describe(Object o) { Map<String, Object> m = new LinkedHashMap<String, Object>(); Method[] methods = o.getClass().getMethods(); for (Method method : methods) { String name = method.getName(); if (!name.startsWith("get")) continue; name = name.substring(3);/* w w w. j ava 2 s. co m*/ String firstChar = "" + name.charAt(0); name = firstChar.toLowerCase() + name.substring(1); Object value = null; try { value = method.invoke(o); } catch (Exception ignore) { } if (name.equals("class")) value = String.valueOf(value); m.put(name, value); } return m; }
From source file:hu.ppke.itk.nlpg.purepos.common.Util.java
public static String toLower(String word) { return word.toLowerCase(); }