#import
NSURL *someURL = [NSURL URLWithString:@"http://www.somesite.com:8080/path/targetpage.html"];
NSLog([NSString stringWithFormat:@"Host: '%@' Port: '%d'", [someURL host], [someURL port]]);
No comments:
Post a Comment