List of usage examples for java.lang String toLowerCase
public String toLowerCase()
From source file:Main.java
public static boolean isEmail(String source) { source = source.toLowerCase(); return EMAIL.matcher(source).matches(); }
From source file:Main.java
private static boolean isImage(String filePath) { filePath = filePath.toLowerCase(); return filePath.endsWith(".png") || filePath.endsWith(".jpg") || filePath.endsWith(".jpeg") || filePath.endsWith(".gif"); }
From source file:Main.java
public static boolean containsIgnoreCase(String str1, String str2) { return str1.toLowerCase().contains(str2.toLowerCase()); }
From source file:Main.java
/** * * @param bool/*from ww w .j a v a2s .co m*/ * @return */ public static boolean convertStringToBoolean(String bool) { bool = bool.toLowerCase().toString().trim(); if (bool.equalsIgnoreCase("t") || bool.equalsIgnoreCase("true") || bool.equalsIgnoreCase("1") || bool.equalsIgnoreCase("yes") || bool.equalsIgnoreCase("y") || bool.equalsIgnoreCase("ok")) { return true; } return false; }
From source file:Main.java
public static ReadPreference valueOf(String name) { return values.get(name.toLowerCase()); }
From source file:Main.java
@SuppressLint("DefaultLocale") public static boolean isHttpsUrl(String url) { return url != null && url.toLowerCase().startsWith("https"); }
From source file:Main.java
public static String getMimeType(String ext) { return mimeTable.get(ext.toLowerCase()); }
From source file:Main.java
public static boolean isVideoType(String mime) { return (mime != null) && (mime.toLowerCase().startsWith("video/")); }
From source file:Main.java
public static String key(String name) { return name == null ? "" : name.toLowerCase();//toUpperCase(); }
From source file:Main.java
public static boolean isNetUrl(String url) { if (url != null && url.toLowerCase().startsWith("http") || url.toLowerCase().startsWith("rtsp") || url.toLowerCase().startsWith("mms")) { return true; }/*from w w w. j av a 2 s.co m*/ return false; }