Last active
March 7, 2017 05:00
-
-
Save npu3pak/e06ffea1c04d8e41be2c46a23b7d7dfc to your computer and use it in GitHub Desktop.
Расшифровывает строки, в которых приходят символы в виде \u0420
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
extension String { | |
var decodingJavaUnicode: String { | |
let jsonString = NSMutableString(string: self) | |
CFStringTransform(jsonString, nil, "Any-Hex/Java" as NSString, true ) | |
return jsonString as String | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment