Categories
c iphone objective-c

Objective C version of explode()?

If I want to explode a string by parts in PHP into an array, I have the nifty explode() function where I just do the following

$mystring = "HI:THERE:HOW";
$stringarray = explode(":", $mystring);

And I get

$stringarray = (
[0] = "HI"
[1] = "THERE"
[2] = "HOW"
);

Is there a similar function in Objective C that explodes a string into an array? Thanks for any help!

NSArray *stringArray = [myString componentsSeparatedByString:@":"];