Created
September 19, 2014 08:21
-
-
Save itoz/eea1218ea83f7b4f0733 to your computer and use it in GitHub Desktop.
[objc] ダブルクォートをシングルクォートにし、改行をとる JSにOBJECTテキスト渡すときとかにつかう
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ダブルクォートをシングルクォートにし、改行をとる | |
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