urldecode in objective-c

前端 未结 6 1746
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 10:19

I\'m dealing with an urlencoded string in objective-c. Is there a foundation function that actually reverse the urlENCODING?

The string received is like: K%FChlschr

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 10:46

    For parmanent solution on iOS 9, use fallowing code

    NSURL* link = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]];
    

提交回复
热议问题