String case-insensitive comparisons, equals, and hashing
--------------------------------------------------------
Key: LANG-447
URL: https://issues.apache.org/jira/browse/LANG-447
Project: Commons Lang
Issue Type: Improvement
Reporter: Paul Benedict
Fix For: 3.0
A common pattern I have is comparing strings case-insensitive in equals(), but
this also means for hashCode() and compareTo() as well. I am looking for
null-safe versions of the following:
StringUtils.equalsIgnoreCase(s1, s2); // already present
StringUtils.compareToIgnoreCase(s1, s2);
StringUtils.hashCodeIgnoreCase(s1, s2);
The last two methods must use the same insensitive algorithm as
equalsIgnoreCase(). All three must compare as upper case or lower case, and
documented as such.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.