标签:blog os ar for div log c new r
/// <summary>
/// 判断字符串全部是否是中文。返回true 则表示含有非中文
/// </summary>
/// <param name="str_chinese"></param>
/// <returns></returns>
public bool IsChinese(string str_chinese)
{
bool b = false;
for (int i = 0; i < str_chinese.Length; i++)
{
Regex reg = new Regex(@"[\u4e00-\u9fa5]");
if (!reg.IsMatch(str_chinese[i].ToString()))
{
b = true;
break;
}
}
return b;
}
标签:blog os ar for div log c new r
原文地址:http://www.cnblogs.com/albertwmm/p/3976036.html