i have an NSString like \"Hello - this is me\". I want to search for the \"-\" and put the text before and after the \"-\" in two separate strings.
Anyone knows how to d
NSArray *subStrings = [myString componentsSeparatedByString:@"-"]; //or rather @" - " NSString *firstString = [subStrings objectAtIndex:0]; NSString *lastString = [subStrings objectAtIndex:1]; //Add some array range checking to it and you're done.