字符串去空格

str = System.Text.RegularExpressions.Regex.Replace(str, @"\s", "");
原文地址:https://www.cnblogs.com/xsmhero/p/1611249.html