Skip to content

Instantly share code, notes, and snippets.

@SRandazzo
Created July 17, 2011 18:15
Show Gist options
  • Save SRandazzo/1087885 to your computer and use it in GitHub Desktop.
Save SRandazzo/1087885 to your computer and use it in GitHub Desktop.
NSString Encoding for Web - iOS
NSString* encodedString = (NSString*)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)@"http://yoururl.com/&/?/!", NULL,(CFStringRef)@":/=,!$&'()*+;[]@#?", kCFStringEncodingUTF8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment