diff options
Diffstat (limited to 'Source/SPStringAdditions.h')
-rw-r--r-- | Source/SPStringAdditions.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h index 47863370..764e6b24 100644 --- a/Source/SPStringAdditions.h +++ b/Source/SPStringAdditions.h @@ -38,18 +38,6 @@ static inline const char* NSStringUTF8String(NSString* self) { return to_return; } -/* - * NSStringDataUsingLossyEncoding(aStr, enc, lossy) := [aStr dataUsingEncoding:enc allowLossyConversion:lossy] - */ -static inline NSData* NSStringDataUsingLossyEncoding(NSString* self, int encoding, int lossy) { - typedef NSData* (*SPStringDataUsingLossyEncodingMethodPtr)(NSString*, SEL, int, int); - static SPStringDataUsingLossyEncodingMethodPtr SPNSStringDataUsingLossyEncoding; - if (!SPNSStringDataUsingLossyEncoding) SPNSStringDataUsingLossyEncoding = (SPStringDataUsingLossyEncodingMethodPtr)[self methodForSelector:@selector(dataUsingEncoding:allowLossyConversion:)]; - NSData* to_return = SPNSStringDataUsingLossyEncoding(self, @selector(dataUsingEncoding:allowLossyConversion:), encoding, lossy); - return to_return; -} - - @interface NSString (SPStringAdditions) + (NSString *)stringForByteSize:(int)byteSize; |