🎨 simplified to islower

This commit is contained in:
William Katz 2021-07-12 16:11:46 -07:00 committed by GitHub
parent a2e0149606
commit 70d0374dd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ bool ValidUsername(const std::string &name) noexcept
} }
for (char c : name) for (char c : name)
{ {
if (!((c >= 97 && c <= 122) || std::isdigit(c) || c == '_')) if (!(std::islower(c) || std::isdigit(c) || c == '_'))
{ {
return false; return false;
} }