Hi,
I'm searching for a Objective-C method like PHP's explode function:
$string = "Helle#world#!";
$delimiter = "#";
$array = explode ( $delimiter, $string);
Result: $array = {"Hello", "world", "!"}
Thanks, Andreas
Hi,
I'm searching for a Objective-C method like PHP's explode function:
$string = "Helle#world#!";
$delimiter = "#";
$array = explode ( $delimiter, $string);
Result: $array = {"Hello", "world", "!"}
Thanks, Andreas
You're looking for componentsSeparatedByString:
NSString *string = @"Hello#world#!";
NSString *delimiter = @"#";
NSArray *array = [string componentsSeparatedByString:delimiter];