Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IF ([myArray containsObject:term]) {...}
- IF ([myArray indexOfObjectPassingTest:^(id obj, NSUInteger idx, BOOL *STOP){
- RETURN [obj caseInsensitiveCompare:term] == NSOrderedSame;
- }] != NSNotFound) {
- // there's at least one object that matches term case-insensitively
- }
- - (BOOL)containsObject:(id)anObject
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement