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

4 lines
185 B
Mathematica
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
NSString *normal = @"http://foo bar/";
NSString *encoded = [normal stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]];
NSLog(@"%@", encoded);