Re: Sorting Array Alphabetically
Re: Sorting Array Alphabetically
- Subject: Re: Sorting Array Alphabetically
- From: Robert Walker <email@hidden>
- Date: Fri, 13 Apr 2007 17:27:32 -0400
http://developer.apple.com/documentation/Cocoa/Conceptual/Collections/
Articles/Arrays.html#//apple_ref/doc/uid/20000132-DontLinkElementID_5
That should answer all your questions...
On Apr 13, 2007, at 4:17 PM, Deborah Goldsmith wrote:
I think the first one will work the way you want by passing
NSString's compare:
Not quite. Based on the sample data, I'm guessing this sort is
intended to be shown to an end user. compare: should *never* be
used to sort a list for display to an end user. It does a
comparison based on the Unicode code point values, which is not
what most users would consider "sorted."
Lists being sorted for end users should *always* use
localizedCompare: or localizedCaseInsensitiveCompare:. Only use
compare: if the end user will not see the ordering.
Deborah Goldsmith
Internationalization, Unicode liaison
Apple Inc.
email@hidden
On Apr 13, 2007, at 6:57 AM, Shamyl Zakariya wrote:
____________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40mac.com
This email sent to email@hidden
--
Robert Walker
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden