Is there something like parse_url in Objective-C?

Is there something like parse_url () in Objective-C?

I like the simplicity of this function in PHP and I need the same thing in the application for iPhone. For example: given the URL http://www.google.com/?someting=somthing

I can get a good data structure with host, protocol, base url ... etc without creating parsing lines.

thank

+3
source share
1 answer

Theres NSURL. You can create NSURLa string and then use techniques such as baseURL, path, query, etc.

+6
source

Source: https://habr.com/ru/post/1784094/


All Articles