我必须从使用NSPredicate (CoreData)
的字符串列表中获取特定的字符串。为例如: 如果我有从CoreData
如何从字符串列表中找到特定的字符串?
从上面的列表以下数组的Helloworld
helloworld1234
的HelloWorld 12345
我只需要1和3结果一个。 我曾尝试以下,但我得到的所有三个作为结果
NSPredicate *predicate =[NSPredicate predicateWithFormat:@"contactName CONTAINS [c]%@",[arySeperator objectAtIndex:1]];
NSArray *filteredArray1 = [arrayContacts filteredArrayUsingPredicate:predicate];
在哪里,我错了?