您的位置:首页 > 其它

汉字百分比编码之间转换

2016-04-09 00:00 148 查看
摘要: 汉字百分比编码之间转换

// 汉字 转 百分百编码
NSString * encodeString = [@"汉字" stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLHostAllowedCharacterSet];

NSLog(@"%@",encodeString);

// 百分比编码 转 汉字
encodeString = [encodeString stringByRemovingPercentEncoding];

NSLog(@"%@",encodeString);

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: