title: Get parts of a NSURL in objective-c
body: <p>I have an NSString with the value of</p>
  
  <pre><code>http://digg.com/news/business/24hr
  </code></pre>
  
  <p>How can I get everything before the 3rd level?</p>
  
  <pre><code>http://digg.com/news/
  </code></pre>