如何使用c#将字符串中的所有行结尾从CR + LF(如果有)转换为asp.net中的LF [英] How to translate all line endings in a string from CR+LF (if any) to LF in asp.net with c#

查看:532
本文介绍了如何使用c#将字符串中的所有行结尾从CR + LF(如果有)转换为asp.net中的LF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将字符串中的所有行结尾从CR + LF(如果有)转换为LF?我想通过asp.net用c#

How to translate all line endings in a string from CR+LF (if any) to LF? I want to do the same via asp.net with c#

推荐答案

做同样的事情。一个简单的谷歌搜索会告诉你如何。有各种方法,所以我建议你搜索并使用最适合你的那个。



例如,http://stackoverflow.com/questions/9400959/string-replace-crlf-with-n [ ^ ]
A simple google search will show you how. There are various ways so I suggest you search and use the one that works best for you.

For example, http://stackoverflow.com/questions/9400959/string-replace-crlf-with-n[^]


这篇关于如何使用c#将字符串中的所有行结尾从CR + LF(如果有)转换为asp.net中的LF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆