|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlog2.util.StringHandler
public class StringHandler
This class provides additional String processing functionality over what the CDC Java package 1.0 provides.
Constructor Summary | |
---|---|
StringHandler()
|
Method Summary | |
---|---|
static boolean |
contains(java.lang.String s1,
java.lang.String s2)
Return true if the String s1 contains the String s2. |
static boolean |
containsIgnoreCase(java.lang.String s1,
java.lang.String s2)
Return true if the String s1 contains the String s2 ignoring case. |
static java.lang.String |
replaceAll(java.lang.String s1,
java.lang.String s2,
java.lang.String replace)
Replace all occurrences of s2 in s1 with the replacement text. |
static java.lang.String |
replaceAllIgnoreCase(java.lang.String s1,
java.lang.String s2,
java.lang.String replace)
Replace all occurrences of s2 in s1 with the replacement text. |
static java.lang.String |
replaceFirst(java.lang.String s1,
java.lang.String s2,
java.lang.String replace)
Replace the first occurrence of s2 in s1 with the replacement text. |
static java.lang.String |
replaceFirstIgnoreCase(java.lang.String s1,
java.lang.String s2,
java.lang.String replace)
Replace the first occurrence of s2 in s1 with the replacement text. |
static java.util.Vector |
tokenize(java.lang.String s1,
java.lang.String separator,
boolean includeSeparator)
Tokenize the string based on the separator and return the tokens. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringHandler()
Method Detail |
---|
public static boolean contains(java.lang.String s1, java.lang.String s2)
s1
- the first String.s2
- the second String.
public static boolean containsIgnoreCase(java.lang.String s1, java.lang.String s2)
s1
- the first String.s2
- the second String.
public static java.lang.String replaceFirst(java.lang.String s1, java.lang.String s2, java.lang.String replace)
s1
- the String to change.s2
- the text to remove.replace
- the text to replace s2 with.
public static java.lang.String replaceFirstIgnoreCase(java.lang.String s1, java.lang.String s2, java.lang.String replace)
s2
in s1
, but add replace
as is.
s1
- the String to change.s2
- the text to remove.replace
- the text to replace s2 with.
public static java.lang.String replaceAll(java.lang.String s1, java.lang.String s2, java.lang.String replace)
s1
- the String to change.s2
- the text to remove.replace
- the text to replace s2 with.
public static java.lang.String replaceAllIgnoreCase(java.lang.String s1, java.lang.String s2, java.lang.String replace)
s2
in s1
, but add replace
as is.
s1
- the String to change.s2
- the text to remove.replace
- the text to replace s2 with.
public static java.util.Vector tokenize(java.lang.String s1, java.lang.String separator, boolean includeSeparator)
s1
- the string to tokenize.separator
- the character sequence to separate tokens.includeSeparator
- if true include separator string as tokens.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |