十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
/**decode编码*/ - (NSString *)encodeToPercentEscapeString { NSString* outputStr = (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes( NULL, /* allocator */ (__bridge CFStringRef)self, NULL, /* charactersToLeaveUnescaped */ (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8); return outputStr; } /**decode解码*/ - (NSString *)decodeFromPercentEscapeString { NSMutableString *outputStr = [NSMutableString stringWithString:self]; [outputStr replaceOccurrencesOfString:@"+" withString:@"" options:NSLiteralSearch range:NSMakeRange(0,[outputStr length])]; return [outputStr stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; }