ios中对url中得特殊字符处理
1 NSString *UrlEncodedString(NSString *sourceText) 2 { 3 NSString *result = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,(CFStringRef)sourceText ,NULL ,CFSTR("!*'();:@&=+$,/?%#[]") ,kCFStringEncodingUTF8)); 4 return result; 5 }