C# Tips: How to remove white-space characters inside a string?

来源:互联网 发布:古代皇帝 知乎 编辑:程序博客网 时间:2024/05/17 11:55

The answer is very simple, just a line of code:

string outputString = Regex.Replace(inputString, @"\s", string.Empty);



原创粉丝点击