@@ -125,12 +125,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]; } @@ -185,11 +184,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]; @@ -303,16 +302,16 @@ - (OFString *)of_URLPathToPathWithURLEncodedHost: (OFString *)URLEncodedHost { OFString *path = self; if (path.length > 1 && [path hasSuffix: @"/"]) - path = [path substringWithRange: of_range(0, path.length - 1)]; + path = [path substringToIndex: path.length - 1]; OFMutableArray OF_GENERIC(OFString *) *components; size_t count; - path = [path substringWithRange: of_range(1, path.length - 1)]; + path = [path substringFromIndex: 1]; components = [[[path componentsSeparatedByString: @"/"] mutableCopy] autorelease]; count = components.count; for (size_t i = 0; i < count; i++) {