RosettaCodeData/Task/URL-encoding/Objective-C/url-encoding-2.m

4 lines
185 B
Mathematica
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
NSString *normal = @"http://foo bar/";
NSString *encoded = [normal stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]];
NSLog(@"%@", encoded);