我试图找出一个简单的方法从字符串中删除\ r \n.
示例:text ="this.is.a.string.\ r \n \nthis.is.a.string\r \n"
我试过了:
text.Replace("\r\n", "")而text.Replace("\r\n", string.Empty)但它不工作.\r\n还在字符串中......
text.Replace("\r\n", "")
text.Replace("\r\n", string.Empty)
\r\n
结果应为:"this.is.a.string.this.is.a.string"
c# string
c# ×1
string ×1