kiwi.util
Class StringUtils
java.lang.Object
|
+--kiwi.util.StringUtils
- public final class StringUtils
- extends Object
A class of miscellaneous string utilities. All of the methods in this class
are static.
- Version:
- 1.1 (11/98)
- Author:
- Mark Lindner, PING Software Group
Method Summary |
static boolean |
isAlphaNumeric(String text)
Determine if a string consists solely of alphanumeric characters. |
static String |
join(String[] array,
String delimiter)
Join an array of strings into a single string of tokens using the given
delimiter. |
static String |
justify(String text,
int cols)
Left justify a string, wrapping words as necessary. |
static String[] |
split(String s,
String delimiter)
Split a string into a series of tokens based on the given delimiter. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
justify
public static final String justify(String text,
int cols)
- Left justify a string, wrapping words as necessary.
- Parameters:
text
- The text to justify.cols
- The number of columns to use.
isAlphaNumeric
public static final boolean isAlphaNumeric(String text)
- Determine if a string consists solely of alphanumeric characters.
- Parameters:
text
- The string to test.- Returns:
- true if the string contains only alphanumeric characters,
and false otherwise.
split
public static final String[] split(String s,
String delimiter)
- Split a string into a series of tokens based on the given delimiter.
- Parameters:
s
- The string to split.delimiter
- A string consisting of characters that should be treated
as delimiters.- Returns:
- An array of tokens.
- See Also:
join(java.lang.String[], java.lang.String)
join
public static final String join(String[] array,
String delimiter)
- Join an array of strings into a single string of tokens using the given
delimiter.
- Parameters:
array
- The tokens to join.delimiter
- A string to insert between adjacent tokens.- Returns:
- The resulting string.
- See Also:
split(java.lang.String, java.lang.String)