如何从NSString中删除双引号.例:
//theMutableString: "Hello World" [theMutableString replaceOccurrencesOfString:@"\"" withString:@"" options:NSCaseInsensitiveSearch range:(NSRange){0,[theMutableString length]}]
它似乎没有用,也许因为我不得不逃避"在replaceOccurrencesOfString?
使用NSMakeRange
函数而不是您的演员.这个工作:
[mString replaceOccurrencesOfString:@"\"" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0, [mString length])];