Re: -[NSString localizedCompare:] - example of semantic difference with compare?
Re: -[NSString localizedCompare:] - example of semantic difference with compare?
- Subject: Re: -[NSString localizedCompare:] - example of semantic difference with compare?
- From: Aki Inoue <email@hidden>
- Date: Mon, 27 Mar 2006 14:29:55 -0800
NSCaseInsensitiveSearch
NSLiteralSearch
NSNumericSearch
I'm thus going to assume the following combination of options
passed to compare:options:range:locale:
NSCaseInsensitiveSearch | NSNumericSearch
is functionally equivalent to these options passed to
CFStringCompareWithOptions:
kCFCompareInsensitive | kCFCompareLocalized |
kCFCompareNumerically | kCFCompareNonliteral
i.e. by not specifying NSLiteralSearch, it will attempt to compare
the attached and detached combining marks correctly.
Yes, that's correct.
NSString methods do non-literal comparison/search by default whereas
CFString counterparts don't.
That's why the flags are negated.
Aki
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden