Hi!
The String tag replace is broken. It looks like you need to change the
StringW class method:
static public String replaceString(String text, String repl, String with,
int n) {
int idx = 0;
while( (idx = text.indexOf(repl)) != -1) {
text = text.substring(0,idx) + with +
text.substring(idx+repl.length() );
idx += with.length(); // jump beyond replacement
n--;
if(n == 0) {
break;
}
}
return text;
}
to:
static public String replaceString(String text, String repl, String with,
int n) {
int idx = 0;
while( (idx = text.indexOf(repl, idx)) != -1) {
text = text.substring(0,idx) + with +
text.substring(idx+repl.length() );
idx += with.length(); // jump beyond replacement
n--;
if(n == 0) {
break;
}
}
return text;
}
If this is alleady done, please ignore. Just trying to help.
Thanks,
Ben
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>