I need to split NSString
to array by specific word.
I've tried to use [componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@" "]]
But the split is performed by a single character, and I need a few chars.
Example:
NSString @"Hello great world";
Split key == @" great ";
result:
array[0] == @"Hello";
array[1] == @"world";