title: NSRange: range.location != NSNotFound vs. range.length > 0
body: <p>I'm going through some older code in one of my apps and fixing up the code in areas that could be potentially problematic.</p>
  
  <p>I'm seeing a lot of old code using...</p>
  
  <pre><code>NSRange range = //determine range here....
  if(range.length &gt; 0)
  {
      //do stuff
  }
  </code></pre>
  
  <p>Is that code "fine", or should I change it to this?</p>
  
  <pre><code>NSRange range = //determine range here....
  if(range.location != NSNotFound)
  {
      //do stuff
  }
  </code></pre>
  
  <p>Are these two methods identical, essentially, or not?</p>