com.opensymphony.oscache.util
Class StringUtil
java.lang.Object
com.opensymphony.oscache.util.StringUtil
public class StringUtil
- extends Object
Provides common utility methods for handling strings.
- Author:
- Chris Miller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
split
public static final List split(String str,
char delimiter)
- Splits a string into substrings based on the supplied delimiter
character. Each extracted substring will be trimmed of leading
and trailing whitespace.
- Parameters:
str
- The string to splitdelimiter
- The character that delimits the string
- Returns:
- A string array containing the resultant substrings
hasLength
public static final boolean hasLength(String s)
- Parameters:
s
- the string to be checked
- Returns:
- true if the string parameter contains at least one element
isEmpty
public static final boolean isEmpty(String s)
- Parameters:
s
- the string to be checked
- Returns:
- true if the string parameter is null or doesn't contain any element
- Since:
- 2.4