【发布时间】:2011-01-08 15:39:54
【问题描述】:
如何从 NSString 中删除双引号。示例:
//theMutableString: "Hello World"
[theMutableString replaceOccurrencesOfString:@"\"" withString:@"" options:NSCaseInsensitiveSearch range:(NSRange){0,[theMutableString length]}]
它似乎不起作用,也许是因为我不得不转义 replaceOccurrencesOfString 中的 "?
【问题讨论】:
-
我认为您使用 [mString length] 来获取 theMutableString 的长度是一个错字?
-
是的,谢谢你接听。
标签: objective-c nsstring