Skip to content

Instantly share code, notes, and snippets.

Embed
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] ==
NSOrderedSame)
return YES; // found a match, keep going
else
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
You can’t perform that action at this time.