有点特别的是,在我们使用replace进行换行符的替换时,需要按顺序进行。
private string cleanString(string newStr) { string tempStr = newStr.Replace(" ", ""); return tempStr = tempStr.Replace(" ", ""); }