1. NSString 类型转 Char*类型
NSString *str = @"这是一个String类型";
const char *charStr = [str UTF8String];
2.Char*类型转NSString类型
NSString *str = [NSString stringWithCString:charStr encoding:NSUTF8StringEncoding];
NSString *str = @"这是一个String类型";
const char *charStr = [str UTF8String];
NSString *str = [NSString stringWithCString:charStr encoding:NSUTF8StringEncoding];