kamalbhai kamalbhai - 8 months ago 66
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:@" "];