import "NSString+HTExtension.h"
@implementation NSString (HTExtension)
/** 转为 char */
-
(char * )turnChar{
//GBK
NSStringEncoding gbkEncoding = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);NSData * data = [self dataUsingEncoding:gbkEncoding];
char * cs = (char *)[data bytes];
return cs;
//https://m.2cto.com/kf/201310/248703.html
}