|
header | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.xframe.xsddoc.util.StringUtil
String Utility methods.
Method Summary | |
static boolean |
equals(java.lang.String string1,
java.lang.String string2)
Checks if two strings are equal. |
static java.lang.String |
replace(java.lang.String text,
char oldChar,
char newChar)
Replaces all occurances of a character within chars with a new character. |
static java.lang.String |
replace(java.lang.String text,
java.lang.String chars,
char newChar)
Replaces all occurances of characters of within chars with a new character. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String replace(java.lang.String text, char oldChar, char newChar)
Example
StringUtil.replace("temp\test/test.txt", "\\/", '_')
results to "temp.test.test.txt"
text
- the text where to replace inoldChar
- old character to replacenewChar
- new character to replace with
public static java.lang.String replace(java.lang.String text, java.lang.String chars, char newChar)
Example
StringUtil.replace("temp\test/test.txt", "\\/", '_')
results to "temp.test.test.txt"
text
- the text where to replace inchars
- list of characters to replacenewChar
- new character to replace with
public static boolean equals(java.lang.String string1, java.lang.String string2)
null
or both strings are equal.
string1
- a string to comparestring2
- another string to compare with
true
if the two strings are equal,
else false
|
header | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |