Re: Sorting array of strings by string length
Re: Sorting array of strings by string length
- Subject: Re: Sorting array of strings by string length
- From: Prachi Gauriar <email@hidden>
- Date: Mon, 20 Feb 2006 17:55:34 -0500
On Feb 20, 2006, at 5:49 PM, Scott Anguish wrote:
On Feb 20, 2006, at 5:42 PM, Nik Youdale wrote:
How would i go about sorting an array of strings in ascending/
descending order of string lengths. Is there an easy way to do
this, like using something like:
[array sortedArrayUsingSelector:@selector
(caseInsensitiveCompare:)], is there a different selector i could
put in there that would sort the array by string length?
you'd need to write your own sort method to use with it, but it's
pretty easy.
You'd add a category to the objects you want to sort.
And by sort method, Scott meant compare method (comparator).
-Prachi
_______________________________________________
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