List of utility methods to do String Empty
String[] | tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) tokenize To String Array if (str == null) { return null; StringTokenizer st = new StringTokenizer(str, delimiters); List<String> tokens = new ArrayList<String>(); while (st.hasMoreTokens()) { String token = st.nextToken(); if (trimTokens) { ... |
String[] | tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) Tokenize the given String into a String array via a StringTokenizer. StringTokenizer st = new StringTokenizer(str, delimiters); List tokens = new ArrayList(); while (st.hasMoreTokens()) { String token = st.nextToken(); if (trimTokens) { token = token.trim(); if (!ignoreEmptyTokens || token.length() > 0) { ... |
String | trimToEmpty(String value) Trims the given value , returns empty if null . if (isBlank(value)) { return ""; return value.trim(); |