Judging whether the character is a method for Chinese characters

xiaoxiao2021-03-06  20

***

Simple Chinese character judgment

Private static int ischaracter (String Word) {

Byte [] str_byte = null;

Str_byte = word.substring (0, 1) .Getbytes ();

IF (str_byte.length == 2) {

Return 1; // is Chinese characters

} else {

Return 0; // is not Chinese characters

}

}

***

转载请注明原文地址:https://www.9cbs.com/read-39468.html

New Post(0)