字符串行数Trim()可以去掉字符串前后的空格,如:

 

 C# Code 
string myString = "  this is a test   ";
Console.WriteLine(myString.Trim());
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2021-09-11
猜你喜欢
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案