Hi, Say I have the following string "Center-World" and I want to separate this string in two different strings but I want the dash to be part of "Center". With the code below I got a string with ["Center","World"] and I want something that returns ["Center-","World"].
Here is my code:
NSCharacterSet *stringDelimiters = [NSCharacterSet characterSetWithCharactersInString:@" :-"]; NSArray *cellContentWords = [cell.text componentsSeparatedByCharactersInSet:stringDelimiters];
Any suggestions?
thanks in advance.