String.equalsIgnoreCase
Class Overview | Class Members | This Package | All Packages
Syntax
public boolean equalsIgnoreCase( String anotherString )
Parameters
- anotherString
the String to compare this String against.
Returns
true if the Strings are equal, ignoring case; false otherwise.
Description
Compares this String to another object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object, where case is ignored.
Two characters are considered the same, ignoring case, if at least one of the following is true:
- The two characters are the same (as compared by the == operator).
- Applying the method Character.toUppercase to each character produces the same result.
- Applying the method Character.toLowercase to each character produces the same result.
Two sequences of characters are the same, ignoring case, if the sequences have the same length and corresponding characters are the same, ignoring case.