Yes: the equalsIgnoreCase()
method.
Let us modify the recursive definition of equals()
so that two strings are equal
if both strings are the same length, and both strings have the same
letters in the same position, but upper and lower case letters
are regarded as equivalent.
For example,
equalsIC( "X", "X" ) is true equalsIC( "X", "x" ) is true equalsIC( "X+++x", "x+++X" ) is true equalsIC( "StingRay", "stingRAY" ) is true
This is similar to the method equalsIgnoreCase()
of String
objects.
Fill each blank in the definition with are equalsIC
or with are NOT equalsIC
.
(Copy and paste.)