tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
isxdigit.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CCTYPE_ISXDIGIT_HPP
4#define TETL_CCTYPE_ISXDIGIT_HPP
5
6namespace etl {
18[[nodiscard]] constexpr auto isxdigit(int ch) noexcept -> int
19{
20 auto const isDigit = ch >= '0' and ch <= '9';
21 auto const isHexLower = ch >= 'a' and ch <= 'f';
22 auto const isHexUpper = ch >= 'A' and ch <= 'F';
23
24 return static_cast<int>(isDigit or isHexLower or isHexUpper);
25}
26} // namespace etl
27
28#endif // TETL_CCTYPE_ISXDIGIT_HPP
constexpr auto isxdigit(int ch) noexcept -> int
Checks if the given character is a hexadecimal numeric character (0123456789abcdefABCDEF).
Definition isxdigit.hpp:18
Definition adjacent_find.hpp:8