Android Utililty Methods Unicode Check

List of utility methods to do Unicode Check

Description

The list of methods to do Unicode Check are organized into topic(s).

Method

booleanisAllHankaku(String str)
is All Hankaku
boolean ret = true;
if (str != null) {
    byte[] bytes = str.getBytes();
    ret = (bytes.length == str.length());
return ret;
booleanisAllZenkaku(String str)
is All Zenkaku
boolean ret = true;
if (str != null) {
    byte[] bytes = str.getBytes();
    ret = (bytes.length == str.length() * 2);
return ret;
StringfilterOutKana(String text)
filter Out Kana
return text.replaceAll("[\u3040-\u3096]+", "");
StringfilterOutNonKanji(String text)
filter Out Non Kanji
return text.replaceAll("[^\u4e00-\u9faf]+", "");