Thursday, July 29, 2010

Put double quotes in NSString

Here is a simple way to put  double quotes in your NSString

NSString *myString = @"I say \"Hello!\"";
The output will be
I say "Hello!"

4 comments:

  1. Wow you passed CS 101 you fucking Indiot moron. Now you're ready for a job in Silicon Valley!

    ReplyDelete
  2. so you are pretty much escaping the string with a back slash. Interesting.

    ReplyDelete
  3. What's up with Anonymous? What an idiot

    ReplyDelete
  4. Whats an Indiot? Is that an idiot indian?

    ReplyDelete