Sha256: 0c8047c0ad5c8cd8b3fd2c61f0cdff523a4bed8ce318585102f6c026a14b141a
Contents?: true
Size: 739 Bytes
Versions: 4
Compression:
Stored size: 739 Bytes
Contents
// // URLEncodeString.m // YueBao // // Created by eiffel on 10-4-27. // Copyright 2010 www.likenote.com. All rights reserved. // #import "URLEncodeString.h" @implementation NSString (URLEncode) // URL encode a string + (NSString *)URLEncodeString:(NSString *)string { NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, CFSTR("% '\"?=&+<>;:-"), kCFStringEncodingUTF8); return [result autorelease]; } // Helper function - (NSString *)URLEncodeString { return [NSString URLEncodeString:self]; } - (BOOL) isWhitespace{ return ([[self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]length] == 0); } @end
Version data entries
4 entries across 4 versions & 1 rubygems