您可以在不转换为字符串的情况下将整数附加到缓冲区上吗?



我找到的唯一 DXL 文档建议转换为字符串

Buffer buf = create()
int i = 2
string str = i ""
buf = str

有没有办法跳过创建字符串并直接转到缓冲区?

不,除非你采取

int i = 2
buf += i""

作为解决方案。这基本上与您相同,只是无需创建额外的变量

最新更新