摘要:
privateintgetLengthb(stringstr){returnSystem.Text.Encoding.Default.GetByteCount(str);} 阅读全文
摘要:
/// /// 截取方法名显示宽度 /// /// 方法名 /// 需要截取的字节长度(可以显示的最长字节长度,包括省略号...) /// private string SubMethodName(string methodName,int byteLen) { int methodLen =... 阅读全文
摘要:
private int GetStrByteLength(string str) { return System.Text.Encoding.Default.GetByteCount(str); } private string SubStrLenth(string str, int startIn... 阅读全文
摘要:
public static string GetFirstString(string stringToSub, int length) { Regex regex = new Regex("[/u4e00-/u9fa5]+", RegexOptions.Compiled); char[] strin... 阅读全文
摘要:
} } return System.Text.Encoding.Unicode.GetString(list.ToArray()); } /// /// 要截取的字节数 /// ///输入的字符串 ///限定长度 ///是否需要省略号,true--需要,false--不需要 ///截取类型 ///截... 阅读全文