NSPredicate confusion. Ignoring spaces.
Posted
by Mr. McPepperNuts
on Stack Overflow
See other posts from Stack Overflow
or by Mr. McPepperNuts
Published on 2010-06-10T16:50:48Z
Indexed on
2010/06/10
16:52 UTC
Read the original article
Hit count: 273
iphone
|objective-c
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name contains [cd] %@", passdTextToSearchFor];
I have two entries in name: "Test One" and "Test Two." If I search for "test," I get 0 results. But if I search for "test one" or "test two" I get the proper result. The search is ignoring the space.
In reality I want both results if the user searches for "test." Any ideas?
I tried contain and like.
© Stack Overflow or respective owner