public boolean isThereLetter(String name) {
char[] chars = name.toCharArray();
for (char c : chars) {
if(!Character.isLetter(c)) {
return false;
}
}
return true;
}
我这样调用这个函数;
if(isThereLetter("Wdasdsa<>")){
Log.d(TAG, "there is a letter");
}else
Log.d(TAG,"there isn't any letter");
但我注意到,由于 ...("Wdasdsa<>") 函数中的“<”这个字符返回 false。我该如何解决?