判断字符串是否为英文
?
public static boolean isEnglish(String word) {boolean isEnglish = false;for (int i = 0; i < word.length(); i++) {if (word.charAt(i) >= 0x0000 && word.charAt(i) <= 0x00ff) {isEnglish = true;} else {isEnglish = false;break;}}return isEnglish;}