|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.util.StringUtil
public class StringUtil
Contains static String utility methods.
Constructor Summary | |
---|---|
StringUtil()
|
Method Summary | |
---|---|
static boolean |
equals(String s1,
String s2)
Return true if the two strings are equal (like String.equals(), but allowing null values for both operands). |
static void |
main(String[] args)
test main |
static boolean |
match(String pattern,
String string)
Checks whether a string matches a given wildcard pattern. |
static String |
replace(String source,
String target,
String replacement)
Replace all occurances of the given target string with the given replacement string in the source string. |
static String[] |
split(String s,
int sep)
Split the string s at the given separator char, if found, and return an array containing the two resulting strings, or null if the separator char was not found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtil()
Method Detail |
---|
public static String replace(String source, String target, String replacement)
source
- source string to be searchedtarget
- the target string to replacereplacement
- the value to replace the target string with
public static String[] split(String s, int sep)
public static boolean equals(String s1, String s2)
public static boolean match(String pattern, String string)
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |