您可以在不转换为字符串的情况下将整数附加到 Buffer 上吗?
Can you append an integer onto a Buffer without converting to a string?
我找到的唯一 DXL 文档建议转换为字符串
Buffer buf = create()
int i = 2
string str = i ""
buf = str
有没有办法跳过创建字符串直接转到缓冲区?
不,除非你接受
int i = 2
buf += i""
作为解决方案。这和你做的基本一样,只是没有创建额外的变量
我找到的唯一 DXL 文档建议转换为字符串
Buffer buf = create()
int i = 2
string str = i ""
buf = str
有没有办法跳过创建字符串直接转到缓冲区?
不,除非你接受
int i = 2
buf += i""
作为解决方案。这和你做的基本一样,只是没有创建额外的变量