tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
iswpunct.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CWCTYPE_ISWPUNCT_HPP
4#define TETL_CWCTYPE_ISWPUNCT_HPP
5
7
8namespace etl {
9
20[[nodiscard]] constexpr auto iswpunct(wint_t ch) noexcept -> int
21{
22 auto const sec1 = ch >= L'!' and ch <= L'/';
23 auto const sec2 = ch >= L':' and ch <= L'@';
24 auto const sec3 = ch >= L'[' and ch <= L'`';
25 auto const sec4 = ch >= L'{' and ch <= L'~';
26 return static_cast<int>(sec1 || sec2 || sec3 || sec4);
27}
28} // namespace etl
29
30#endif // TETL_CWCTYPE_ISWPUNCT_HPP
constexpr auto iswpunct(wint_t ch) noexcept -> int
Checks if the given wide character is a punctuation character, i.e. it is one of !...
Definition iswpunct.hpp:20
Definition adjacent_find.hpp:8
unsigned int wint_t
Definition wint_t.hpp:29