Drop dead URLEncoding category

This commit is contained in:
Blake Watters
2012-08-28 20:55:54 -04:00
parent 3ea60a95ba
commit 9f825d7394
2 changed files with 0 additions and 44 deletions

View File

@@ -1,19 +0,0 @@
//
// NSObject+URLEncoding.h
// RestKit
//
// Created by Jeff Arena on 7/11/11.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
@interface NSObject (URLEncoding)
/**
* Returns a representation of the object as a URLEncoded string
*
* @returns A UTF-8 encoded string representation of the object
*/
- (NSString *)URLEncodedString;
@end

View File

@@ -1,25 +0,0 @@
//
// NSObject+URLEncoding.m
// RestKit
//
// Created by Jeff Arena on 7/11/11.
// Copyright (c) 2009-2012 RestKit. All rights reserved.
//
#import "NSObject+URLEncoding.h"
@implementation NSObject (URLEncoding)
- (NSString *)URLEncodedString
{
NSString *string = [NSString stringWithFormat:@"%@", self];
NSString *encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL,
(CFStringRef)string,
NULL,
(CFStringRef)@"!*'();:@&=+$,/?%#[]",
kCFStringEncodingUTF8);
return [encodedString autorelease];
}
@end