Skip to content

Commit

Permalink
util/CharUtil: add IsLowerHexDigit()
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Mar 11, 2024
1 parent be84b18 commit 02c4512
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/util/CharUtil.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit 02c4512

Please sign in to comment.