Compares two strings lexicographically, ignoring case
differences. This method returns an integer whose sign is that of
calling compareTo
with normalized versions of the strings
where case differences have been eliminated by calling
Character.toLowerCase(Character.toUpperCase(character))
on
each character.
Note that this method does not take locale into account, and will result in an unsatisfactory ordering for certain locales. The java.text package provides collators to allow locale-sensitive ordering.
str | the String to be compared. |
java.text.Collator.compare(String, String)
Diagram: String