//NSString转换char
NSString * str1= @"Test";
const char * c1 =[str1 UTF8String];
//char转换NSString
const char * c2 ="test";
NSString *str2 = [NSStringstringWithUTF8String:c2];
//NSString转换char
NSString * str1= @"Test";
const char * c1 =[str1 UTF8String];
//char转换NSString
const char * c2 ="test";
NSString *str2 = [NSStringstringWithUTF8String:c2];
转载于:https://www.cnblogs.com/nanguabing/archive/2013/01/25/2876408.html