Qwe*_*tie 6 types rust
我有一个字节数组,我想将其返回为std::string::String. 我发现的其他答案和文档是将 Vectors 转换为字符串。
std::string::String
我如何将字节数组转换&[u8]为 a String?
&[u8]
String
Tim*_*ann 7
它正在与std::str::from_utf8:
std::str::from_utf8
std::str::from_utf8(byte_array).unwrap().to_string();
操场
归档时间:
7 年,7 月 前
查看次数:
5141 次
最近记录: