kamalbhai kamalbhai - 9 months ago 71
iOS Question

Remove underscore From a String

I have a string as in "aa_bb_cc". I want to convert it into a single string of "aa bb cc" with spaces between each of aa, bb and cc. How can I do that ?? Thanks.


You can use:

 str = [str stringByReplacingOccurrencesOfString:@"_"
                                     withString:@" "];