htmlhelper 相关的软件列表

首页

c#完美截断字符串代码(中文+非中文)

2020-02-16 标签:c,完美,截断,字符串,代码,中文,非中文,实现,如下,public,static,string,truncation,htmlhelper,str,int,len,n,ull,length

实现代码如下: public static string Truncation(this HtmlHelper htmlHelper, string str, int len) { if (str == null || str.Length == 0 || len 128) { len--; }