vala-字节转换为字符串?
我有一个 glib.bytes 对象。
我想打印它并将其用作字符串这样:
Bytes bytes = new Bytes({65, 66, 67});
print(bytes); // <-- ERROR
如何将其转换为字符串?
I have a GLib.Bytes object.
I want to print it and use it as a string like this:
Bytes bytes = new Bytes({65, 66, 67});
print(bytes); // <-- ERROR
How can I convert it to string?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
获取 RAW BYTE数组
uint8 []
with bytes.get_data()和 cast 作为字符串。示例:
输出:
Get raw byte array
uint8[]
with Bytes.get_data() and cast it as string.Example:
Output: