ios - How to replace spaces with + in string with format -


possible duplicate:
how replace spaces +'s in xcode

in string need replace spaces:

controller.body = [nsstring stringwithformat:@"http://maps.google.com/maps?q=%@@%@,%@", pintitle.text, newlatlabel.text, newloglabel.text]; 

like:

nsstring *finalstring = [controller.body stringbyreplacingoccurrencesofstring:@" " withstring: @"+"]; 

controller.body = [nsstring stringwithformat:@"http://maps.google.com/maps?q=%@@%@,%@", pintitle.text, newlatlabel.text, newloglabel.text];  nsstring *finalstring = [controller.body stringbyreplacingoccurrencesofstring:@" " withstring: @"+"];  controller.body = finalstring; 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -