Github user kinow commented on a diff in the pull request:
https://github.com/apache/commons-lang/pull/340#discussion_r209907553
--- Diff: src/main/java/org/apache/commons/lang3/StringUtils.java ---
@@ -5596,8 +5596,8 @@ private static String replace(final String text,
String searchString, final Stri
}
String searchText = text;
if (ignoreCase) {
- searchText = text.toLowerCase();
- searchString = searchString.toLowerCase();
+ searchText = text.toUpperCase();
+ searchString = searchString.toUpperCase();
--- End diff --
Yeah, a very slippery problem. We still have the option to simply document
that the method does not work well with unicode strings.
But first I would like to spend at least a few hours with paper and pencil
(and eraser, because this could take a bit till I give up or find a possible
way around it), and perhaps even check in the mailing list if other devs have
any idea.
I think you found a very interesting problem (*)! Keep the ideas coming if
you have any on how to solve this issue :+1:
_* if I had more time, I would possibly either go through other methods
checking for that or, just try some fuzzifier approach to test the whole
project ! Not aware of any static or dynamic analysis tool that does that_
---