Created
October 27, 2010 16:29
-
-
Save veritech/649382 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//MGTwitterEngine | |
- (NSString *)_encodeString:(NSString *)string | |
{ | |
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, | |
(CFStringRef)string, | |
NULL, | |
(CFStringRef)@";/?:@&=$+{}<>,", | |
kCFStringEncodingUTF8); | |
return [result autorelease]; | |
} | |
//My Code | |
- (NSString *) URLEncodedString: (NSString *) string { | |
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, | |
(CFStringRef)string, | |
NULL, | |
(CFStringRef)@"!;/?:@&=$+{}<>,", | |
kCFStringEncodingUTF8); | |
return [result autorelease]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment