@@ -163,12 +163,11 @@ if (pos == OF_NOT_FOUND || pos == 0) { objc_autoreleasePoolPop(pool); return @""; } - ret = [fileName substringWithRange: - of_range(pos + 1, fileName.length - pos - 1)]; + ret = [fileName substringFromIndex: pos + 1]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } @@ -233,11 +232,11 @@ if (pos == OF_NOT_FOUND || pos == 0) { objc_autoreleasePoolPop(pool); return [[self copy] autorelease]; } - fileName = [fileName substringWithRange: of_range(0, pos)]; + fileName = [fileName substringToIndex: pos]; [components replaceObjectAtIndex: components.count - 1 withObject: fileName]; ret = [OFString pathWithComponents: components]; @@ -356,13 +355,13 @@ { OFString *path = self; if (path.length > 1 && [path hasSuffix: @"/"] && ![path hasSuffix: @":/"]) - path = [path substringWithRange: of_range(0, path.length - 1)]; + path = [path substringToIndex: path.length - 1]; - path = [path substringWithRange: of_range(1, path.length - 1)]; + path = [path substringFromIndex: 1]; path = [path stringByReplacingOccurrencesOfString: @"/" withString: @"\\"]; if (URLEncodedHost != nil) { OFString *host = [URLEncodedHost stringByURLDecoding];