Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[objc] ダブルクォートをシングルクォートにし、改行をとる JSにOBJECTテキスト渡すときとかにつかう
NSStirng * string = @"hogehoge";
string = [string stringByReplacingOccurrencesOfString:@"\"" withString:@"\'"];
string = [string stringByReplacingOccurrencesOfString:@"\n" withString:@""];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.