Did someone can give me a hint which property of a Range is the equivalent property to the location property of an NSRange.
Especially I'm interested how I would migrate the following line of code from Swift 2.3 -> Swift 3.0
if myRange.location != NSNotFound { ... }
myRange is still a Range property and so the compiler tells me correct: Value of Type Range has no member location
Is it enough to check the empty property?
if !myRange.isEmpty { ... }
Thanks in advance
Like the comments say, instead of returning NSNotFound you will get a nil range.
To answer your question though .location has been replaced with .lowerBound and .upperBound.