public class StringUtil extends Object
Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
replaceAll(String source,
String pattern,
String replace)
This method replaces all occurrences of the pattern with the
replacement String
|
static List<String> |
tokenize(String source,
char separator)
Breaks a String to multiple strings.
|
static List<String> |
tokenize(String source,
String separator)
Breaks a String to multiple strings (similar to string tokenizer)
|
static Vector |
tokenizeString(String source,
char separator)
Deprecated.
use the tokenize() method instead
|
static Vector |
tokenizeString(String source,
String separator)
Deprecated.
use the tokenize() method instead
|
public static String replaceAll(String source, String pattern, String replace)
source
- the String sourcepattern
- String to replace in the sourcereplace
- replacement Stringpublic static Vector tokenizeString(String source, char separator)
source
- the String to breakseparator
- the pattern to search and break.public static Vector tokenizeString(String source, String separator)
source
- the String to breakseparator
- the characters that can be used to search and break.public static List<String> tokenize(String source, char separator)
source
- the String to breakseparator
- the pattern to search and break.