使用  变量.Replace(@“\0”,"")

string str="abcde\0\0\0\0\0\0";

str=str.Replace(@"\0","");

str的结果是abcde。

相关文章:

猜你喜欢
相关资源
相似解决方案