List of usage examples for java.lang String toLowerCase
public String toLowerCase()
From source file:com.taobao.tddl.jdbc.group.util.GroupHintParser.java
private static String extractTDDLGroupHintString(String sql) { return TStringUtil.getBetween(sql.toLowerCase(), "/*+tddl_group({", "})*/"); }
From source file:Main.java
/** * Null-safe method for converting the given string to lower-case. * * @param string the string./*from ww w .ja v a 2 s.co m*/ * @return the string in lower-case. */ public static String lower(String string) { return string != null ? string.toLowerCase() : null; }
From source file:Main.java
/** * Tells if the zip data should only be stored and not be compressed. * @param name The name of the zip entry * @return <code>true</code> for store only and <code>false</code> for compress. *//*from w w w .j a va 2s.c o m*/ public static boolean isStoreOnlyFile(String name) { name = name.toLowerCase(); if (name.endsWith(".jpg") || name.endsWith(".jpeg")) { return true; } else if (name.endsWith(".png")) { return true; } else if (name.endsWith(".gif")) { return true; } else if (name.endsWith(".zip") || name.endsWith(".rar")) { return true; } return false; }
From source file:Main.java
public static boolean checkIsZH(String input) { char[] charArray = input.toLowerCase().toCharArray(); for (char c : charArray) { String tempC = Character.toString(c); if (tempC.matches("[\u4E00-\u9FA5]+")) { return true; }//from ww w .ja va 2 s . c o m } return false; }
From source file:Main.java
public static boolean isAndroid(String vmName) { String lowerVMName = vmName.toLowerCase(); return lowerVMName.contains("dalvik") // || lowerVMName.contains("lemur") // aliyun-vm name ;//from w ww . j ava2 s. c o m }
From source file:Main.java
private static boolean isContainAny(String in, String[] strArr) { for (String str : strArr) { if (in.contains(str.toLowerCase())) return true; }/*from ww w. j a v a 2s.c o m*/ return false; }
From source file:Main.java
public static byte[] decodeHex(String str) { str = str.toLowerCase(); int len = str.length(); byte[] data = new byte[len / 2]; for (int i = 0; i < len; i += 2) { data[i / 2] = (byte) ((Character.digit(str.charAt(i), 16) << 4) + Character.digit(str.charAt(i + 1), 16)); }//from ww w. j a va 2 s.c o m return data; }
From source file:Main.java
public static String tranLowCase(String str) { String string = str.replaceAll(" ", ""); return string.toLowerCase(); }
From source file:Main.java
public static boolean wordExistsInArrayEquals(String word, String[] wordsArray) { for (String arrayWord : wordsArray) { if (arrayWord.toLowerCase().equals(word)) { return true; }/*from www . j a va 2 s.com*/ } return false; }
From source file:Main.java
/** * This function filters the input collection and returns a collection of elements containing the specified input (Ignore Case). * @param coll/* ww w . j a v a 2 s .co m*/ * @param str * @return Filtered Collection<String> */ public static Collection<String> containsStringIgnoreCase(Collection<String> coll, final String str) { Collection<String> list = new ArrayList<String>(); for (String item : coll) { if (item.toLowerCase().contains(str.toLowerCase())) { list.add(item); } } return list; }