Commit cc3e71d8 authored by Max Kellermann's avatar Max Kellermann

util/CharUtil: add IsHexDigit()

parent dd37b465
...@@ -130,4 +130,12 @@ ToLowerASCII(char ch) noexcept ...@@ -130,4 +130,12 @@ ToLowerASCII(char ch) noexcept
: ch; : ch;
} }
constexpr bool
IsHexDigit(char ch) noexcept
{
return IsDigitASCII(ch) ||
(ch >= 'a' && ch <= 'f') ||
(ch >= 'A' && ch <= 'F');
}
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment