美文网首页
UTF64转String

UTF64转String

作者: 蒋昉霖 | 来源:发表于2016-11-23 19:39 被阅读41次
    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);

相关文章

网友评论

      本文标题:UTF64转String

      本文链接:https://www.haomeiwen.com/subject/wbvvpttx.html