/* Cydia NSString Additions {{{ */
@interface NSString (Cydia)
- (NSComparisonResult) compareByPath:(NSString *)other;
-- (NSString *) stringByCachingURLWithCurrentCDN;
- (NSString *) stringByAddingPercentEscapesIncludingReserved;
@end
return result == NSOrderedSame ? value : result;
}
-- (NSString *) stringByCachingURLWithCurrentCDN {
- return [self
- stringByReplacingOccurrencesOfString:@"://cydia.saurik.com/"
- withString:@"://cache.cydia.saurik.com/"
- ];
-}
-
- (NSString *) stringByAddingPercentEscapesIncludingReserved {
return [(id)CFURLCreateStringByAddingPercentEscapes(
kCFAllocatorDefault,
href = [href substringFromIndex:(colon.location + 3)];
href = [href stringByAddingPercentEscapes];
href = [CydiaURL(@"api/repotag/") stringByAppendingString:href];
- href = [href stringByCachingURLWithCurrentCDN];
NSURL *url([NSURL URLWithString:href]);