Guest User

Untitled

a guest
Aug 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. NSPredicate: compare only part of string?
  2. Bob###USA
  3. Tim###UK
  4. Sandy###German
  5.  
  6. NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF CONTAINS[cd] %@", __searchTerm];
  7. NSArray *result = [self.source filteredArrayUsingPredicate:predicate];
Add Comment
Please, Sign In to add comment