How to detect if certain characters are at the end of an NSString?
- by Sheehan Alam
Let's assume I can have the following strings:
"hey @john..."
"@john, hello"
"@john(hello)"
I am tokenizing the string to get every word separated by a space:
[myString componentsSeparatedByString:@" "];
My array of tokens now contain:
@john...
@john,
@john(hello)
For these cases. How can I make sure only @john is tokenized, while…