开发者

How to initialize NSString as text with double quotes [duplicate]

This question already has answers here: 开发者_如何学JAVA Is it possible to include a quotation mark as part of an nsstring? (7 answers) Closed 8 years ago.

i want to initialize NSString is as "hai" with double qoutes..is it possible? any help please? but NSString *str = @"hai"; i want to convert it as "hai" without direct initialization?any help pls?


If you want to convert an existing string please use this:

NSString *newString = [NSString stringWithFormat:@"\"%@\"",str];


NSString* foo = @"\"hai\"";

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜