开发者

How can I add quotation marks to NSString? [duplicate]

开发者 https://www.devze.com 2023-02-05 23:29 出处:网络
This question already has answers here: 开发者_开发知识库Is it possible to include a quotation mark as part of an nsstring?
This question already has answers here: 开发者_开发知识库 Is it possible to include a quotation mark as part of an nsstring? (7 answers) Closed 8 years ago.

How can I add quotation marks to NSString ? for example, string = @"my string with "Big string" ";


Put a backslash \ before the quotation mark. Example:

NSString *str = @"my string with \"Big string\"";


string = @"my string with \"Big string\" "; 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号