How can we write " in nsstring?

后端 未结 6 690
忘了有多久
忘了有多久 2020-12-09 18:56

I have to initialize string as \"Rose\" including Quotation Mark. How to write \" in our string?

6条回答
  •  清歌不尽
    2020-12-09 19:25

    Use the escape character: \

    NSString *r = @"\"Rose\"";
    

    You can find additional information about Escape character and String literal.

提交回复
热议问题