url 编码和解码

参考http://www.cnblogs.com/hanjun/archive/2013/05/02/3054667.html
参考http://www.skyfox.org/ios-url-urlencode-and-urldecode.html

编码

[string stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet];

解码

[string stringByRemovingPercentEncoding];

你可能感兴趣的:(url 编码和解码)