• 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
NSString comparing alphanumerically (with numbers)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSString comparing alphanumerically (with numbers)


  • Subject: NSString comparing alphanumerically (with numbers)
  • From: nicolas berloquin <email@hidden>
  • Date: Wed, 22 May 2002 15:25:22 +0200

Hi !

(I hope someone will have a hint on this one, unless I'm now banned
completely ;-))
Is there a direct/simple way to compare two NSStrings (during a sort),
while keeping numbers as numbers
mixed with text ? (ie toto1 < toto2 < toto10 and not toto1 < toto10 <
toto2 ) ?

what would be the best *cocoa* way to do it ? (Or should I compare each
character myself?)
(neither caseInsensitiveCompare nor NSLiteralSearch do the job)

thanks ^_^

(et bonjour aux francais, il semble qu'on soit nombreux ici !)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSString comparing alphanumerically (with numbers)
      • From: zauhar <email@hidden>
    • Re: NSString comparing alphanumerically (with numbers)
      • From: Nicholas Riley <email@hidden>
  • Prev by Date: mySQL; Cocoa; dealing with german special chars
  • Next by Date: Re: mySQL; Cocoa; dealing with german special chars
  • Previous by thread: Re: mySQL; Cocoa; dealing with german special chars
  • Next by thread: Re: NSString comparing alphanumerically (with numbers)
  • Index(es):
    • Date
    • Thread