public static int ChineseLetterCount(string strText) { byte[] byts = System.Text.Encoding.GetEncoding("gb2312").GetBytes(strText); return byts.Length - strText.Length; } |
|
来自: 悟静 > 《.net和asp.net》