I would like to separate my string by spaces, commas, periods (ie. punctuations). I am using:
[myString componentsSeparatedByString:@" "];
to separate by spaces, but need to be able to split by punctuations as well.
I would like to separate my string by spaces, commas, periods (ie. punctuations). I am using:
[myString componentsSeparatedByString:@" "];
to separate by spaces, but need to be able to split by punctuations as well.
Use componentsSeparatedByCharactersInSet:
with a character set made up of whatever characters you want to split by.