Android examples for java.lang:String Null or Empty
is Blank string
public class Main{ public static boolean isBlank(String str) { int strLen; if (str == null || (strLen = str.length()) == 0) { return true; }//from w w w .ja va2 s .c om for (int i = 0; i < strLen; i++) { if ((Character.isWhitespace(str.charAt(i)) == false)) { return false; } } return true; } }