• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString's compare:options: and NSNumericSearch. Huh?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSString's compare:options: and NSNumericSearch. Huh? (From: Manfred Schubert <email@hidden>)
 >Re: NSString's compare:options: and NSNumericSearch. Huh? (From: Ricky Sharp <email@hidden>)
 >Re: NSString's compare:options: and NSNumericSearch. Huh? (From: Manfred Schubert <email@hidden>)
 >Re: NSString's compare:options: and NSNumericSearch. Huh? (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: NSString's compare:options: and NSNumericSearch. Huh?
  • Next by Date: Re: changing brightness and contrast in an nsimage
  • Previous by thread: Re: NSString's compare:options: and NSNumericSearch. Huh?
  • Next by thread: Re: NSString's compare:options: and NSNumericSearch. Huh?
  • Index(es):
    • Date
    • Thread