3 lines
185 B
Objective-C
3 lines
185 B
Objective-C
NSString *normal = @"http://foo bar/";
|
|
NSString *encoded = [normal stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]];
|
|
NSLog(@"%@", encoded);
|