Ken Tabb wrote:

> I've got an app that needs to keep track of version numbers (eg.  
> "10.6.2") of things, and needs to be able to sort by these too. Is  
> there a class in Cocoa that handles this?

To which Clark Cox replied:

> NSString's -compare:options: already handles mixed
> alphanumeric strings like this when passed the NSNumericSearch option.

How well does it handle something like 1.0.1b5, or something to that effect, 
though? I knocked out a category on NSString several years ago that converts 
back and forth between a string and Apple's NumVersion structure and provides a 
comparison method. I'm willing to share, or can post it somewhere if there's a 
common site for such things.

G
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to