public static class StringUtil.StringReplacer
extends java.lang.Object
| Constructor and Description |
|---|
StringReplacer(java.lang.String str) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
replaceString(java.lang.String toReplace,
java.lang.String replaceBy)
replace a string in a given String if the replacement string is contained by the string to replace, recursively replace until no ocurrences of the original remain thus
replaceString("a000000", "00", "0") will return "a0" rather than "a000"
|
void |
setReRead(boolean reRead)
set the reread algorithm - if true (the default) the replaced string is checked again.
|
public void setReRead(boolean reRead)
reRead - public java.lang.String replaceString(java.lang.String toReplace,
java.lang.String replaceBy)
toReplace - String to match and replacereplaceBy - String to insert for toReplace, null if nothing should be inserted