摘要: //中英混合字符串截断 public static string getStr(string s, int l) { string temp = s; if (Regex.Replace(temp, "[\u4e00-\u9fa5]", "zz", RegexOptions.IgnoreCase).Length <= l) { return temp; } for (int i = temp.Length; i >= 0; i--) { temp = temp.Substring(0, i); if (Regex.Replace(temp, 阅读全文
posted @ 2012-03-01 11:41 Chaoa 阅读(523) 评论(0) 推荐(0)