首页
Java
登录
6mi
u
盘
搜
搜 索
Java
判断字符串是否包含中文
判断字符串是否包含中文
xiaoxiao
2021-02-28
132
public static boolean isContainChinese(String str) {
Pattern p = Pattern.compile("[\u4e00-\u9fa5]");
Matcher m = p.matcher(str);
if (m.find()) {
return true;
}
return false;
}
转载请注明原文地址: https://www.6miu.com/read-40337.html
技术
最新回复
(
0
)