List of utility methods to do Unicode Check
boolean | isAllHankaku(String str) is All Hankaku boolean ret = true; if (str != null) { byte[] bytes = str.getBytes(); ret = (bytes.length == str.length()); return ret; |
boolean | isAllZenkaku(String str) is All Zenkaku boolean ret = true; if (str != null) { byte[] bytes = str.getBytes(); ret = (bytes.length == str.length() * 2); return ret; |
String | filterOutKana(String text) filter Out Kana return text.replaceAll("[\u3040-\u3096]+", ""); |
String | filterOutNonKanji(String text) filter Out Non Kanji return text.replaceAll("[^\u4e00-\u9faf]+", ""); |