Re: NSPredicate like NSLiteralSearch

2009-12-15 Thread Gerriet M. Denkmann
On 15 Dec 2009, at 23:13, Jim Turner wrote: > I believe you need the diacritic insensitive option: > > 'someProperty BEGINSWITH[d] "ก"' Well, no. BEGINSWITH[d] tells me that "กิน" begins with "กุ" - that is: it ignores not only the tone-marks, but also some vowels, which makes it quite unusab

Re: NSPredicate like NSLiteralSearch

2009-12-15 Thread Jim Turner
I believe you need the diacritic insensitive option: 'someProperty BEGINSWITH[d] "?"' Look up NSComparisonPredicate options in the documentation for more discussion. As for what the 'w' means, it's Spotlight specific. "The Comparison is word based, and also detects transitions from lower-case t

NSPredicate like NSLiteralSearch

2009-12-15 Thread Gerriet M. Denkmann
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 -[NSArrayContr