Android examples for Internationalization:English
Is String a English word
public class Main{ public static boolean strIsEnglish(String word) { // boolean sign = true; // ???????'true' for (int i = 0; i < word.length(); i++) { if (!(word.charAt(i) >= 'A' && word.charAt(i) <= 'Z') && !(word.charAt(i) >= 'a' && word.charAt(i) <= 'z')) { return false; }/*from w w w . j ava2 s . c o m*/ } return true; } }