I am coding in Java and I understand well that I can compare most arrays with Arrays.equals
, and I can compare strings case insensitively with String.equalsIgnoreCase
, but is there a way to specifically compare Arrays of strings case insensitively?
sample code:
class Foo {
String[] array; // don't care about case
@Override
public boolean equals(Foo obj) {
// bunch of stuff to check equality
if (!Arrays.equals(array, obj.array)) return false; // case insensitive?
return true;
}
}