Github user kinow commented on a diff in the pull request:
https://github.com/apache/commons-lang/pull/340#discussion_r208851249
--- 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 --
Just leaving a comment here too to have a review here in GitHub. While your
example works, as the character is considered already in upper case, the
reverse case would still fail after changing from `toLowerCase` to
`toUpperCase`. So I think we should find another solution or update the
documentation stating how the code works with unicode.
---