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: Manfred Schubert <email@hidden>
- Date: Sun, 4 Dec 2005 05:35:13 +0100
Am 04.12.2005 um 03:46 schrieb Ricky Sharp:
NSString* string1 = [NSString stringWithString:@"Foo2.txt"];
NSString* string2 = [NSString stringWithString:@"Foo7.txt"];
NSString* string3 = [NSString stringWithString:@"Foo25.txt"];
result = [string1 compare:string2 options:NSLiteralSearch |
NSNumericSearch | NSCaseInsensitiveSearch];
NSLog (@"first = %d", result);
result = [string2 compare:string3 options:NSLiteralSearch |
NSNumericSearch | NSCaseInsensitiveSearch];
NSLog (@"second = %d", result);
And it works! You get NSOrderedAscending in both cases.
Yes, you are right. This works. The results with the string literals
confused me. Looks like a bug to me.
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