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