6
NSString *test = @"d'escape";
NSLog(@"%@", [test stringByReplacingOccurrencesOfString:@"'" withString:@"\'"]);
打印我这个问题iOS中逃逸单引号与stringByReplacingOccurrencesOfString:widthString
2010-10-25 15:10:54.833 MyApp[7136:207] d'escape
我在做什么错?我希望得到这样的:
2010-10-25 15:10:54.833 MyApp[7136:207] d\'escape
我以为这是愚蠢的我失踪^^非常感谢 – 2010-10-25 13:18:45