NSString's compare:options: and NSNumericSearch. Huh?
NSString's compare:options: and NSNumericSearch. Huh?
- Subject: NSString's compare:options: and NSNumericSearch. Huh?
- From: Manfred Schubert <email@hidden>
- Date: Sun, 4 Dec 2005 00:44:07 +0100
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?
Manfred
_______________________________________________
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