I have a string say \"Allentown, pa\"
\"Allentown, pa\"
How to remove the white space in between , and pa using objective c?
,
pa
Probably the solution in one of the answers in Collapse sequences of white space into a single character and trim string:
NSString *whitespaceString = @" String with whitespaces "; NSString *trimmedString = [whitespaceString stringByReplacingOccurrencesOfString:@" " withString:@""];