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
Post a Comment