/**
* 判断String中是否包含中文
* @param str
* @return
*/
public static boolean isContainChinese(String str) {
Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
Matcher m = p.matcher(str);
if (m.find()) {
return true;
}
return false;
}
JAVA判斷String中是否含有中文
猜你喜欢
转载自blog.csdn.net/Iverson941112/article/details/96178525
今日推荐
周排行