@implementation NSString (URLEncoding) - (NSString *)encodeString//:(NSStringEncoding)encoding { return (NSString *) CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)self, NULL, (CFStringRef)@";/?:@&=$+{}<>,", CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding))); } @end
No comments:
Post a Comment