util/CharUtil: add IsLowerHexDigit()

This commit is contained in:
Max Kellermann 2023-12-21 17:36:42 +01:00
parent be84b189dc
commit 02c4512b00

View File

@ -133,9 +133,15 @@ ToLowerASCII(char ch) noexcept
}
constexpr bool
IsHexDigit(char ch) noexcept
IsLowerHexDigit(char ch) noexcept
{
return IsDigitASCII(ch) ||
(ch >= 'a' && ch <= 'f') ||
(ch >= 'a' && ch <= 'f');
}
constexpr bool
IsHexDigit(char ch) noexcept
{
return IsLowerHexDigit(ch) ||
(ch >= 'A' && ch <= 'F');
}