欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

中文字符串判断

程序员文章站 2022-03-24 19:58:34
...

public class EnZhDistinguish {

    public static void main(String[] args) {
        String s = "aa中囯bb";
        System.out.println(s.length() == s.getBytes().length);
    }

}
相关标签: 中文字符