I have a NSMutableArray which contains a few NSString objects. How can I test if the array contains a particular string literal?
NSMutableArray
NSString
I tried
You may also use a predicate:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF IN %@", theArray]; BOOL result = [predicate evaluateWithObject:theString];