去除URL中的转义符

路径字符串经过转义后为如下字符串:


NSString * str = @"http://139.162.24.236:7000/graphql?query=%7Bcheck_sign%7Bneed_crypt%20key_random%20status%7D%7D";


如何转义回来?如下方法即可。

    

NSString * t = str.stringByRemovingPercentEncoding;

猜你喜欢

转载自blog.csdn.net/cjh965063777/article/details/78974049