删除byte []中的垃圾数据 [英] Remove garbage data in byte[]

查看:33
本文介绍了删除byte []中的垃圾数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在如何删除所有\0中遇到困难(以及所有其他垃圾内容)我的变量。

Hi,

I am having difficulties on how I can remove all the "\0" (and all other garbage stuffs) in my variable.

展开 | 选择 | Wrap | 行号

推荐答案

你能来吗?初始化字节数组?

Can you initialize the byte array?

展开 | 选择 | Wrap | 行号


感谢你的回复。

是的,垃圾来自API调用
Thanks for your reply.
Yes, the garbage come after the API call


到目前为止,这就是我想出来的。还有比这更好的解决方案吗?

So far this is what I came up with. Is there any better solution than this?

展开 | 选择 | Wrap | 行号


这篇关于删除byte []中的垃圾数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆