Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
-(NSIndexSet *) lookupAll: (NSString *) theName
NSIndexSet *result = [book indexOfObjectsPassingTest:
^(id obj, NSUInteger idx, BOOL *stop)
if ([[obj name] caseInsensitiveCompare: theName] ==
return YES; // found a match, keep going
return NO; // keep looking
// Return the result
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment