NSString *str = @"测试转换";
UInt64 buff_str[1024];
memcpy(buff_str,[str UTF8String], [str length]+1);
NSLog(@"char = %s",buff_str);
NSString *str_From_buff = [NSString stringWithCString:(char*)buff_str encoding:NSUTF8StringEncoding];
NSLog(@"string = %@",str_From_buff);
网友评论