diff --git a/src/util/CharUtil.hxx b/src/util/CharUtil.hxx index 2dc7e34eb..44c3ad1f8 100644 --- a/src/util/CharUtil.hxx +++ b/src/util/CharUtil.hxx @@ -130,4 +130,12 @@ ToLowerASCII(char ch) noexcept : ch; } +constexpr bool +IsHexDigit(char ch) noexcept +{ + return IsDigitASCII(ch) || + (ch >= 'a' && ch <= 'f') || + (ch >= 'A' && ch <= 'F'); +} + #endif