3

Is there there somethings like parse_url() equivalent in Objective C?

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

I can get a nice data structure with the host, protocol, base url...etc, without having to create parse strings.

Thanks

1 Answer 1

6

There’s NSURL. You can create an NSURL from a string and then use methods like baseURL, path, query, etc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.