// 编码:
let contentString1 = contentString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
print("编码后:",contentString1)
// 解码:
let contentString2 = contentString.removingPercentEncoding!
print("解码后:",contentString2)
// 编码:
let contentString1 = contentString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
print("编码后:",contentString1)
// 解码:
let contentString2 = contentString.removingPercentEncoding!
print("解码后:",contentString2)
本文标题:swift 表情编码与解码
本文链接:https://www.haomeiwen.com/subject/rvatnltx.html
网友评论