public class StringUtils extends Object
Simple utility class for String operations useful across the framework.
Some methods in this class were copied from the Spring Framework so we didn't have to re-invent the wheel, and in these cases, we have retained all license, copyright and author information.
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
tokenizeToStringArray(String str,
String delimiters)
Tokenize the given String into a String array via a StringTokenizer.
|
static String[] |
toStringArray(Collection collection)
Copy the given Collection into a String array.
|
public static String[] tokenizeToStringArray(String str, String delimiters)
The given delimiters string is supposed to consist of any number of
delimiter characters. Each of those characters can be used to separate
tokens. A delimiter is always a single character; for multi-character
delimiters, consider using delimitedListToStringArray
Copied from the Spring Framework while retaining all license, copyright and author information.
str - the String to tokenizedelimiters - the delimiter characters, assembled as String
(each of those characters is individually considered as delimiter)null if the input String
was null)StringTokenizer,
String.trim()public static String[] toStringArray(Collection collection)
Copied from the Spring Framework while retaining all license, copyright and author information.
collection - the Collection to copynull if the passed-in
Collection was null)Copyright © 2004-2014. All Rights Reserved.