NSMutableArray *list = |
[NSMutableArray arrayWithObjects:@"Mark", @"Balmer", @"Bill", @"Steve", nil]; |
NSPredicate *listBPredicate = [NSPredicate predicateWithFormat:@"SELF beginswith[c] 'b'"]; |
NSArray *namesBeginB = [list filteredArrayUsingPredicate:listBPredicate];
|
listBPredicate will return names which starts in "b" and listContainsPredicate will return all the names which has letter "e".
No comments:
Post a Comment