标签: ios objective-c nsrange
range.location > targetString.length
range.length !=0
答案 0 :(得分:1)
无效的NSRange将location成员设置为NSNotFound(NSIntegerMax),所以:
NSRange
location
NSNotFound
NSIntegerMax
length
location != NSNotFound