checkMaxAlphabet static method
Implementation
static bool checkMaxAlphabet(String string, int maxAlphabet) {
int counter = 0;
string = string.toUpperCase();
for (int i = 0; i < string.length; i++) {
if (string.codeUnitAt(i) >= 65 && string.codeUnitAt(i) <= 90) {
counter++;
}
}
if (counter <= maxAlphabet) {
return true;
}
return false;
}