ios - Predicate Query for CoreData -


i want write search function using nspredicate search start of element [not contains, have start].

right predicate is:

nspredicate *resultpredicate = [nspredicate predicatewithformat:@"self contains[cd] %@", searchtext]; 

how can search string start ?

use beginswith instead of contains. note can still use [cd] when using beginswith.

see full documentation here.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -