【C#-去空格】去掉字符串后空字符串\0\0\0\0\0\0

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

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

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

str的结果是abcde。

posted @ 2016-07-25 11:23  发明创造小能手  阅读(3721)  评论(0编辑  收藏  举报
levels of contents