@Test public void isBlankTest() { Assert.assertTrue(StringUtil.isBlank(null)); Assert.assertTrue(StringUtil.isBlank("")); Assert.assertTrue(StringUtil.isBlank(" ")); Assert.assertTrue(StringUtil.isBlank(" ")); Assert.assertFalse(StringUtil.isBlank("a")); Assert.assertFalse(StringUtil.isBlank("ab")); }
public static boolean isBlank(String str) { int strLen = 0; if (str == null || (strLen = str.length()) == 0) { return true; } for (int i = 0; i < strLen; ++i) { if ( !(Character.isWhitespace(str.charAt(i)))) { return false; } } return true; }
StringUtil { public static boolean isBlank(String str) { int strLen = 0; if (str == null || (strLen = str.length()) == 0) { return true; } for (int i = 0; i < strLen; ++i) { if ( !(Character.isWhitespace(str.charAt(i)))) { return false; } } return true; } }
StringUtil { public static boolean isBlank(String str) { int strLen = 0; if (str == null || (strLen = str.length()) == 0) { return true; } for (int i = 0; i < strLen; ++i) { if ( !(Character.isWhitespace(str.charAt(i)))) { return false; } } return true; } private  StringUtil(); }
StringUtil { public static boolean isBlank(String str) { int strLen = 0; if (str == null || (strLen = str.length()) == 0) { return true; } for (int i = 0; i < strLen; ++i) { if ( !(Character.isWhitespace(str.charAt(i)))) { return false; } } return true; } private  StringUtil(); static boolean isBlank(String str); }
StringUtil { public static boolean isBlank(String str) { int strLen = 0; if (str == null || (strLen = str.length()) == 0) { return true; } for (int i = 0; i < strLen; ++i) { if ( !(Character.isWhitespace(str.charAt(i)))) { return false; } } return true; } private  StringUtil(); static boolean isBlank(String str);  }