Re: Sort Through Commas in Cocoa
Re: Sort Through Commas in Cocoa
- Subject: Re: Sort Through Commas in Cocoa
- From: Pierce Freeman <email@hidden>
- Date: Wed, 26 Nov 2008 18:28:12 -0800
Thanks for your reply. I understand how you would do that much, but
how exactly would you do that if Apple, Banana, Grape were stored in a
variable?
Sent from my iPhone
On Nov 26, 2008, at 6:23 PM, Nick Zitzmann <email@hidden> wrote:
On Nov 26, 2008, at 7:12 PM, Pierce Freeman wrote:
Assuming that you get input from user via a regular text field, I am
wondering how you can sort through the commas and then save each of
the
words that come before the commas into a array. For example, the
words
below would be what the user inputted:
Apple, banana, grapes
NSArray *fruitsAndBerries = [@"Apple, banana, grapes"
componentsSeparatedByString:@", "];
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden