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 -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -