]> git.saurik.com Git - cydia.git/blobdiff - UICaboodle/UCString.h
Commit the webview_ -> document_ change.
[cydia.git] / UICaboodle / UCString.h
index 77ee6a1b3060884e2055abe82b95bc4108adcda2..d776728adab9477b16769cd999bb4b0a93f4691a 100644 (file)
@@ -3,8 +3,14 @@
 
 #import <Foundation/NSString.h>
 
+@interface NSString (UIKit)
+- (NSString *) stringByAddingPercentEscapes;
+- (NSString *) stringByReplacingCharacter:(unsigned short)arg0 withCharacter:(unsigned short)arg1;
+@end
+
 @interface NSString (UICaboodle)
 + (NSString *) stringWithDataSize:(double)size;
+- (NSString *) stringByAddingPercentEscapesIncludingReserved;
 @end
 
 @implementation NSString (UICaboodle)
     return [NSString stringWithFormat:@"%.1f%s", size, powers_[power]];
 }
 
+- (NSString *) stringByAddingPercentEscapesIncludingReserved {
+    return [(id)CFURLCreateStringByAddingPercentEscapes(
+        kCFAllocatorDefault, 
+        (CFStringRef) self,
+        NULL,
+        CFSTR(";/?:@&=+$,"),
+        kCFStringEncodingUTF8
+    ) autorelease];
+}
+
 @end
 
 #endif/*UICABOODLE_UCSTRING_H*/