怎么样把\r 或 \n 统一转成 \r\n 啊,但本身假如是\r\n不能转成\r\r\n
解决方案
40
直接Replace,行不?
var htmlcontent = @"Record\rdafdas\r\nfdsafdsa\n"; htmlcontent = htmlcontent.Replace(@"\r\n", "***").Replace(@"\r", "\r\n").Replace(@"\n", @"\r\n").Replace("***",@"\r\n");