Example usage for java.lang Character isIdeographic

List of usage examples for java.lang Character isIdeographic

Introduction

In this page you can find the example usage for java.lang Character isIdeographic.

Prototype

public static boolean isIdeographic(int codePoint) 

Source Link

Document

Determines if the specified character (Unicode code point) is a CJKV (Chinese, Japanese, Korean and Vietnamese) ideograph, as defined by the Unicode Standard.

Usage

From source file:Main.java

public static void main(String[] args) {
    int cp1 = 0x008f, cp2 = 0x0123;

    boolean b1 = Character.isIdeographic(cp1);
    boolean b2 = Character.isIdeographic(cp2);

    System.out.println(b1);//w ww. j  a  v  a 2s  . com
    System.out.println(b2);
}

From source file:cn.lambdalib.util.client.font.Fragmentor.java

TokenType getType(char ch) {
    if (isPunct(ch)) {
        return TokenType.PUNCT;
    } else if (Character.isWhitespace(ch)) {
        return TokenType.SPACE;
    } else if (Character.isIdeographic(ch)) {
        return TokenType.CJKV;
    } else {/*from   www.  j  a v a 2s  .  c o  m*/
        return TokenType.WORD;
    }
}