@@ -21,11 +21,11 @@ /* Reference for static linking */ int _OFURLEncoding_reference; @implementation OFString (OFURLEncoding) -- (OFString*)urlencode +- (OFString*)urlEncodedString { const char *s; char *ret_c; size_t i; OFString *ret; @@ -36,12 +36,12 @@ * Worst case: 3 times longer than before. * Oh, and we can't use [self allocWithSize:] here as self might be a * @"" literal. */ if ((ret_c = malloc((length * 3) + 1)) == NULL) - @throw [OFNoMemException newWithClass: isa - andSize: (length * 3) + 1]; + @throw [OFOutOfMemoryException newWithClass: isa + andSize: (length * 3) + 1]; for (i = 0; *s != '\0'; s++) { if (isalnum(*s) || *s == '-' || *s == '_' || *s == '.') ret_c[i++] = *s; else { @@ -61,11 +61,11 @@ } return ret; } -- (OFString*)urldecode +- (OFString*)urlDecodedString { const char *s; char *ret_c, c; size_t i; int st; @@ -72,12 +72,12 @@ OFString *ret; s = string; if ((ret_c = malloc(length + 1)) == NULL) - @throw [OFNoMemException newWithClass: isa - andSize: length + 1]; + @throw [OFOutOfMemoryException newWithClass: isa + andSize: length + 1]; for (st = 0, i = 0, c = 0; *s; s++) { switch (st) { case 0: if (*s == '%')