From: "Phil Steitz" <[EMAIL PROTECTED]>
> The example in the bug report looks like a bug to me, which should be
> fixed. I doubt seriously that anyone is relying on the following kind of
> bugged behavior:
>
> StringUtils.replaceChars("abc", "abc", "cba") = "aba"
>
> This results from the string being modified and re-searched in a loop over
> the search characters (so multiple "translations" may be applied,
> depending on the order of characters in the search string).
>
> As long as the search and replace character strings have the same length,
> StringUtils.replaceChars() *should* produce the same results as
> CharSetUtils.translate().
>
> I suggest, therefore
>
> (5) Fix the bug in StringUtils.replaceChars() and improve the javadoc for
> this method.
+1, replaceChars should be like calling replaceChars(String, char, char)
multiple times.

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to