您的位置:首页 > 其它

判断字符串中是否包含中文

2006-06-28 12:33 232 查看
  public bool IncludeChinese(string str)
  {
   byte [] bytes = System.Text.Enconding.GetEncoding("gb2312").GetBytes(str);
   return bytes.Length != str.Length;
  } 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  string byte