开发者

Is there something like parse_url in Objective C?

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.goog开发者_JAVA技巧le.com/?someting=somthing

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

Thanks


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜