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