Re: NSString's compare:options: and NSNumericSearch. Huh?
Re: NSString's compare:options: and NSNumericSearch. Huh?
- Subject: Re: NSString's compare:options: and NSNumericSearch. Huh?
- From: Ricky Sharp <email@hidden>
- Date: Sat, 3 Dec 2005 18:21:01 -0600
On Dec 3, 2005, at 5:44 PM, Manfred Schubert wrote:
The header of NSString says about NSNumericSearch:
/* Added in 10.2; Numbers within strings are compared using numeric
value, that is, Foo2.txt < Foo7.txt < Foo25.txt; only applies to
compare methods, not find */
So then if I do:
result = [@"Foo2.txt" compare:@"Foo7.txt" options:NSNumericSearch];
I correctly get NSOrderedAscending, but for
result = [@"Foo7.txt" compare:@"Foo25.txt" options:NSNumericSearch];
I get NSOrderedDescending.
What am I missing here?
I just tried the above and in both cases the result is
NSOrderedAscending. My OS (10.4.3) uses US English and Number Format
is also set to US.
___________________________________________________________
Ricky A. Sharp
mailto:email@hidden
Instant Interactive(tm)
http://www.instantinteractive.com
_______________________________________________
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