-2

The method returns true if such character
is a letter of the English alphabet (uppercase or lower case) or one of the arabic numerals. The method returns false otherwise

Badr A
  • 1
  • 1
    Does this answer your question? [What is the best Java email address validation method?](https://stackoverflow.com/questions/624581/what-is-the-best-java-email-address-validation-method) – Alexander Ivanchenko Feb 11 '22 at 14:51
  • 1
    @AlexanderIvanchenko Afaik `:;` is a valid email address. What op mean is a mail*box*-address I guess. – Grim Feb 13 '22 at 01:29

1 Answers1

0

Method for ASCII character set

boolean isEnglishLetterOrDigit(char letter) {
      return (letter >= 'a' && letter <= 'z') ||
             (letter >= 'A' && letter <= 'Z') ||
             (letter >= '0' && letter <= '9');
  }
Eugene
  • 5,269
  • 2
  • 14
  • 22