I have two NSArrays each containing NSStrings. I need to test whether the two arrays are equal. In this instance, equality means not that the arrays contain the same objects, but that each object returns true for isEqualToString when compared its counterpart. The arrays are also not equal if one contains more items than the other, or the order of the items is different.
Can I assume isEqualToArray won't help me here?
Similarly, I don't see an approach using NSSet that would fulfill all of the criteria.
How might I test the equality of these two arrays?
isEqualToArray:usesisEqual:on each pair of objects.NSStringis broken. Again, look at the docs forisEqualToString:.isEqualToStringis a tiny bit faster thanisEqualif both objects are strings (because the method doesn't check at runtime to see if they are both strings).