@Test public void testIsEmpty() { assertTrue(StringUtils.isEmpty(null)); assertTrue(StringUtils.isEmpty("")); assertTrue(StringUtils.isEmpty("\t\r\n")); assertFalse(StringUtils.isEmpty(" test ")); }
public static boolean isEmpty(String s) { if (s!=null) { for (int i=0; i<s.length(); i++) if (s.charAt(i)>' ') return false; } return true; }
StringUtils { public static boolean isEmpty(String s) { if (s!=null) { for (int i=0; i<s.length(); i++) if (s.charAt(i)>' ') return false; } return true; } }
StringUtils { public static boolean isEmpty(String s) { if (s!=null) { for (int i=0; i<s.length(); i++) if (s.charAt(i)>' ') return false; } return true; } private  StringUtils(); }
StringUtils { public static boolean isEmpty(String s) { if (s!=null) { for (int i=0; i<s.length(); i++) if (s.charAt(i)>' ') return false; } return true; } private  StringUtils(); static String toString(Object value, String defValue); static String toString(Object value); static String toString(Object[] array, String defValue); static String toString(Object[] array); static String valueOf(Object value); static String valueOf(Object[] array); static String coalesce(String preferred, String alternative); static String nullIfEmpty(Object value); static boolean contains(String value, String substring); static boolean notContains(String value, String substring); static String arrayToString(Object[] array, String separator); static boolean isEmpty(String s); static boolean isNotEmpty(String s); static boolean compareEqual(String s1, String s2, boolean ignoreCase); static boolean compareEqual(String s1, String s2); static boolean compareNotEqual(String s1, String s2, boolean ignoreCase); static boolean compareNotEqual(String s1, String s2); static String validate(String s); static String replace(String source, String find, String replace); static String replaceAll(String s, String find, String replace); static String remove(String s, String remove); static String remove(String s, char c); static String removeBlanks(String s); static boolean isCharBetween(char c, char beg, char end); static boolean isNumber(char c); static boolean isNumber(String s); static boolean isNumeric(char c, boolean decimal); static boolean isNumeric(String s, boolean decimal); static boolean isUpper(char c); static boolean isUpper(String s, int count); static boolean isLower(char c); static boolean isLower(String s, int count); static String toUpper(String s, int count); static String toLower(String s, int count); }
StringUtils { public static boolean isEmpty(String s) { if (s!=null) { for (int i=0; i<s.length(); i++) if (s.charAt(i)>' ') return false; } return true; } private  StringUtils(); static String toString(Object value, String defValue); static String toString(Object value); static String toString(Object[] array, String defValue); static String toString(Object[] array); static String valueOf(Object value); static String valueOf(Object[] array); static String coalesce(String preferred, String alternative); static String nullIfEmpty(Object value); static boolean contains(String value, String substring); static boolean notContains(String value, String substring); static String arrayToString(Object[] array, String separator); static boolean isEmpty(String s); static boolean isNotEmpty(String s); static boolean compareEqual(String s1, String s2, boolean ignoreCase); static boolean compareEqual(String s1, String s2); static boolean compareNotEqual(String s1, String s2, boolean ignoreCase); static boolean compareNotEqual(String s1, String s2); static String validate(String s); static String replace(String source, String find, String replace); static String replaceAll(String s, String find, String replace); static String remove(String s, String remove); static String remove(String s, char c); static String removeBlanks(String s); static boolean isCharBetween(char c, char beg, char end); static boolean isNumber(char c); static boolean isNumber(String s); static boolean isNumeric(char c, boolean decimal); static boolean isNumeric(String s, boolean decimal); static boolean isUpper(char c); static boolean isUpper(String s, int count); static boolean isLower(char c); static boolean isLower(String s, int count); static String toUpper(String s, int count); static String toLower(String s, int count);  }