遇到这个一段字符串
“publicId=2030095197043302&publicBizType=CONTENT_USER&chInfo=ch_life__chsub_Ndiscovery.featured&logoUrl=https%3A%2F%2Fmdn.alipayobjects.com%2Fopen_content%2Fafts%2Fimg%2FA*_SUKQodfigcAAAAAAAAAAAAAfVx1AQ%2Foriginal&publicName=\U5c24\U5948\U7684\U53a8\U623f”;
现在由于业务需要,我们需要将字符串中的百分号去掉,
使用系统方法 stringByRemovingPercentEncoding
NSString *string = @"publicId=2030095197043302&publicBizType=CONTENT_USER&chInfo=ch_life__chsub_Ndiscovery.featured&logoUrl=https%3A%2F%2Fmdn.alipayobjects.com%2Fopen_content%2Fafts%2Fimg%2FA*_SUKQodfigcAAAAAAAAAAAAAfVx1AQ%2Foriginal&publicName=\\U5c24\\U5948\\U7684\\U53a8\\U623f";NSString *normalString = [string stringByRemovingPercentEncoding];NSLog(@"string %@ \n normalString %@", string, normalString);