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