@@ -16,22 +16,22 @@ #include "config.h" #include #include -#import "OFString+URLEncoding.h" +#import "OFString+PercentEncoding.h" #import "OFCharacterSet.h" #import "OFInvalidFormatException.h" #import "OFInvalidEncodingException.h" #import "OFOutOfMemoryException.h" /* Reference for static linking */ -int _OFString_URLEncoding_reference; +int _OFString_PercentEncoding_reference; -@implementation OFString (URLEncoding) -- (OFString *)stringByURLEncodingWithAllowedCharacters: +@implementation OFString (PercentEncoding) +- (OFString *)stringByAddingPercentEncodingWithAllowedCharacters: (OFCharacterSet *)allowedCharacters { OFMutableString *ret = [OFMutableString string]; void *pool = objc_autoreleasePoolPush(); const OFUnichar *characters = self.characters; @@ -73,11 +73,11 @@ objc_autoreleasePoolPop(pool); return ret; } -- (OFString *)stringByURLDecoding +- (OFString *)stringByRemovingPercentEncoding { void *pool = objc_autoreleasePoolPush(); const char *string = self.UTF8String; size_t length = self.UTF8StringLength; char *retCString;