c#去除字符串中的空格,回车,换行符,制表符时间:2022-04-11 12:56:39 string l_strResult = str.Replace("\n", "").Replace(" ","").Replace("\t","").Replace("\r","");