is Chinese character by range - Java java.lang

Java examples for java.lang:char

Description

is Chinese character by range

Demo Code


//package com.java2s;

public class Main {
    public static boolean ishanzi(char ch) {
        if ((ch >= '\u4e00' && ch <= '\u9fa5')
                || (ch >= '\uF900' && ch <= '\uFA2D'))
            return true;
        return false;
    }/*w  w  w.j a v  a 2s  .c o m*/
}

Related Tutorials