Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective-C Find and Replace String problem

im trying to do a find and replace on a string to do

tempString =[tempString stringByReplacingOccurrencesOfString:@""" withString:@"""];

but it does not work with the """, is there anyway i can wrap the quote so i can use it?

like image 228
richard Stephenson Avatar asked Dec 13 '10 19:12

richard Stephenson


1 Answers

Have you tried a backslash before the second "? A la:

tempString = [tempString stringByReplacingOccurrencesOfString:@""" withString:@"\""];
like image 131
fbrereto Avatar answered Nov 11 '22 12:11

fbrereto