判断字符串中文,C# 判断字符是否中文还是英文

private static bool IsHanZi(string ch)
{
byte[] byte_len = System.Text.Encoding.Default.GetBytes(ch);
if (byte_len.Length == 2) { return true; }
return false;
}
Tags:  js判断字符相等 js判断字符串 判断字符串中文

延伸阅读

最新评论

发表评论