如何将字符串转化成二进制流的字符串了?
NSString *str = self.searchBar.text; //需要转化的字符串
NSString * encodedString = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes( kCFAllocatorDefault, (CFStringRef)str, NULL, NULL, kCFStringEncodingUTF8 ));
NSString *str = self.searchBar.text; //需要转化的字符串
NSString * encodedString = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes( kCFAllocatorDefault, (CFStringRef)str, NULL, NULL, kCFStringEncodingUTF8 ));