5

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?

2 Answers 2

21

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

tempString = [tempString stringByReplacingOccurrencesOfString:@""" withString:@"\""];
Sign up to request clarification or add additional context in comments.

Comments

0

nevermind , have sorted the issue

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

thanks for looking :)

1 Comment

You should really award the answer to @fbrereto who answered correctly at exactly the same time as you :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.