@@ -927,11 +927,11 @@ inRange: (of_range_t)range { size_t i; for (i = 0; i < range.length; i++) - buffer[i] = [self characterAtIndex: range.start + i]; + buffer[i] = [self characterAtIndex: range.location + i]; } - (BOOL)isEqual: (id)object { void *pool; @@ -1205,11 +1205,11 @@ if (options & OF_STRING_SEARCH_BACKWARDS) { for (i = range.length - searchLength;; i--) { if (!memcmp(unicodeString + i, searchString, searchLength * sizeof(of_unichar_t))) { objc_autoreleasePoolPop(pool); - return of_range(range.start + i, + return of_range(range.location + i, searchLength); } /* No match and we're at the last character */ if (i == 0) @@ -1218,11 +1218,11 @@ } else { for (i = 0; i <= range.length - searchLength; i++) { if (!memcmp(unicodeString + i, searchString, searchLength * sizeof(of_unichar_t))) { objc_autoreleasePoolPop(pool); - return of_range(range.start + i, + return of_range(range.location + i, searchLength); } } } } @finally { @@ -1267,17 +1267,17 @@ - (OFString*)substringWithRange: (of_range_t)range { void *pool; OFString *ret; - if (range.start + range.length > [self length]) + if (range.location + range.length > [self length]) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; pool = objc_autoreleasePoolPush(); ret = [[OFString alloc] - initWithUnicodeString: [self unicodeString] + range.start + initWithUnicodeString: [self unicodeString] + range.location length: range.length]; objc_autoreleasePoolPop(pool); return [ret autorelease]; }