忆安 千里之行始于足下、记录下的点滴,必将汇成浩瀚的海洋

判断是否是中文

public static boolean isChinese(String str) {
Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
Matcher m = p.matcher(str);
if (m.find()) {
return true;
}
return false;
}

posted @ 2020-09-25 15:40  忆安  阅读(98)  评论(0)    收藏  举报