Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tsornin

macrumors newbie
Original poster
Jul 23, 2002
26
0
Is there a way to split a string into an array of individual characters? I've tried this but it doesn't seem to work:

NSString *foo = @"The quick brown fox";
NSArray *chars = [foo componentsSeparatedByString:mad:""];

But then the length of chars is 1, and chars[0] contains the entire string rather than just "T".

I must be missing something obvious...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.