public class test { public static void main(String[] args) { String a = "中国China"; for (int i=a.length(); --i>=0;) { String b = a.substring(i, i+1); boolean c = java.util.regex.Pattern.matches("[\u4E00-\u9FA5]", b); if(c) { System.out.println("此字符串包含中文"); break; } } } }


EFWAGGFAWGR
2023年10月19日
暂无贡献等级
12dadqq LV1
2022年10月10日
nothing
2021年11月22日
暂无贡献等级
zqy999
2021年9月13日
暂无贡献等级
adan101
2021年8月21日
暂无贡献等级
2196316269 LV10
2021年2月24日
胡万岁 LV2
2020年10月6日
hfk2020 LV2
2020年5月22日
2354627756 LV1
2019年9月25日
cheeseni LV1
2019年7月6日