let str = “http://www.example.com/栗子/"
let encodedStr = str.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())
let url = NSURL.init(string: encodeStr!)
let str = “http://www.example.com/栗子/"
let encodedStr = str.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())
let url = NSURL.init(string: encodeStr!)
本文标题:Swift中如何创建带中文字符(特殊字符)的URL
本文链接:https://www.haomeiwen.com/subject/zumwdttx.html
网友评论