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 20:49:46 -0600
On Dec 3, 2005, at 8:46 PM, Ricky Sharp wrote:
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);
I meant to reduce the options to just NSNumericSearch in the code
above. It still works as expected with just that flag; you get
NSOrderedAscending in both cases.
___________________________________________________________
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