大马资讯论坛 - 马来西亚中文资讯平台

 找回密码
 注册
搜索

[教学] XCode Swift 2 转换php的urlencode,等于的符号%3D iOS

[复制链接]
发表于 2016-1-27 23:08:49 | 显示全部楼层 |阅读模式
[教学] XCode Swift 2 转换php的urlencode,等于的符号%3D iOS

  1.         let sContent = "a+b=c"
  2.         let characterSet = NSMutableCharacterSet.alphanumericCharacterSet()
  3.         characterSet.addCharactersInString("-._~")
  4.         sContent = sContent.stringByAddingPercentEncodingWithAllowedCharacters(characterSet)
  5.         print(sContent)
复制代码

手机版|大马资讯论坛  

GMT+8, 2022-5-21 19:56 , Processed in 0.029661 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表