Seeing that you cannot use Character.isLetter(c), I would just imitate it functionally. I would do this by treating the character as a "number" using its ASCII value .
public static boolean isLetter(char c) {
return (c > 64 && c < 91) || (c > 96 && c < 123);
}
public static boolean isUpperCase(char c) {
return c > 64 && c < 91;
}
public static boolean isSpace(char c) {
return c == 32 || c == 12 || c == 13 || c == 14;
}
Edit: Thanks @Nate for suggestions / corrections
source
share