NSPredicate like NSLiteralSearch
NSPredicate like NSLiteralSearch
- Subject: NSPredicate like NSLiteralSearch
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Tue, 15 Dec 2009 14:30:14 +0700
This works. i.e. returns {0,1}:
NSRange r2 = [ @"ก่ี" rangeOfString: @"ก" options: NSAnchoredSearch | NSLiteralSearch ];
(without NSLiteralSearch it returns NSNotFound).
but an NSPredicate with: "someProperty BEGINSWITH "ก" " does NOT find ก่ี".
(the NSPredicate is to be used with -[NSArrayController setFilterPredicate:] to query Core Data).
So: is there some string_option equivalent to NSLiteralSearch?
And a related question: where are the available string_options defined?
The Predicate Programming Guide has:
string_options ::= c | d | cd
but also an example with "w":
((* = "FooBar*"wcd)) || (kMDItemTextContent = "FooBar*"cd))
10.6.2
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden