Get parts of a NSURL in objective-c

Viewed 67883

I have an NSString with the value of

http://digg.com/news/business/24hr

How can I get everything before the 3rd level?

http://digg.com/news/
2 Answers
Related