tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
iswalnum.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CWCTYPE_ISWALNUM_HPP
4#define TETL_CWCTYPE_ISWALNUM_HPP
5
7
8namespace etl {
9
22[[nodiscard]] constexpr auto iswalnum(wint_t ch) noexcept -> int
23{
24 auto isDigit = ch >= L'0' and ch <= L'9';
25 auto isLower = ch >= L'a' and ch <= L'z';
26 auto isUpper = ch >= L'A' and ch <= L'Z';
27 return static_cast<int>(isDigit or isLower or isUpper);
28}
29
30} // namespace etl
31
32#endif // TETL_CWCTYPE_ISWALNUM_HPP
constexpr auto iswalnum(wint_t ch) noexcept -> int
Checks if the given wide character is an alphanumeric character, i.e. either a number (0123456789),...
Definition iswalnum.hpp:22
Definition adjacent_find.hpp:8
unsigned int wint_t
Definition wint_t.hpp:29