As the title suggests, I would like to get the last word out of an NSString. I thought using this code:
NSArray *listItems = [someNSStringHere componentsSepa
That works great as it also recognizes symbols like @ and # which enumerateSubstringsInRange:
doesn't do.
NSCharacterSet *charSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
NSArray *components = [someString componentsSeparatedByCharactersInSet:charSet];
NSString *lastWord = components.lastObject;