Let's assume I have the string
NSString* myString = @"Hello,";
How can I remove the comma without leaving a space? I have tried:
NSString* newString = [myString stringByReplacingOccurrencesOfString:@"," withString:@""];
and
NSString* newString = [myString stringByTrimmingCharactersInSet:[NSCharacterSet punctuationCharacterSet]];
But both are leaving spaces.