kamalbhai kamalbhai - 4 months ago 20
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.

Answer

You can use:

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