mirror of
https://github.com/nsnail/ns-ext.git
synced 2025-04-18 23:22:51 +08:00
1.0.7
This commit is contained in:
parent
97acd3ea56
commit
1ea481e749
@ -1,3 +1,3 @@
|
||||
do.exe trim-utf8-bom
|
||||
do.exe remove-whitespace
|
||||
do.exe convert-lf
|
||||
dot rbom -w
|
||||
dot trim -w
|
||||
dot tolf -w
|
@ -522,6 +522,16 @@ public static class StringExtensions
|
||||
.ToLower(CultureInfo.CurrentCulture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 纯文本字符串转html
|
||||
/// </summary>
|
||||
/// <param name="me"></param>
|
||||
/// <returns></returns>
|
||||
public static string Text2Html(this string me)
|
||||
{
|
||||
return me.Replace(" ", " ").Replace("\r\n", "<br />").Replace("\r", "<br />").Replace("\n", "<br />");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 蛇形命名
|
||||
|
Loading…
x
Reference in New Issue
Block a user