Quote:
Originally Posted by PhysX
Code:
NSString *hold=[page substringWithRange:NSMakeRange(page.length-200,page.length-150)]
|
The function NSMakeRange takes a start location and a *length* , not a start and end location. In your example, if the length is 1000, then you're trying to get a string starting at 800 with length of 850. 800 + 850 = 1650, which is out of range for string with length 1000.
Try this:
Code:
NSString *hold=[page substringWithRange:NSMakeRange(page.length-200,50)]