Removing “NUL” characters

前端 未结 7 1448
死守一世寂寞
死守一世寂寞 2020-11-29 19:44

I have got characters like that in my notepad++

When i am trying to copy whole line, i am actually copying everything until \"NUL\":

File:1
         


        
相关标签:
7条回答
  • 2020-11-29 20:27

    I tried to use the \x00 and it didn't work for me when using C# and Regex. I had success with the following:

    //The hexidecimal 0x0 is the null character  
    mystring.Contains(Convert.ToChar(0x0).ToString() );  
    
    // This will replace the character
    mystring = mystring.Replace(Convert.ToChar(0x0).ToString(), "");  
    
    0 讨论(0)
提交回复
热议问题