tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
ispunct.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_CCTYPE_ISPUNCT_HPP
4
#define TETL_CCTYPE_ISPUNCT_HPP
5
6
namespace
etl
{
7
22
[[nodiscard]]
constexpr
auto
ispunct
(
int
ch)
noexcept
->
int
23
{
24
auto
const
sec1 = ch >=
'!'
and ch <=
'/'
;
25
auto
const
sec2 = ch >=
':'
and ch <=
'@'
;
26
auto
const
sec3 = ch >=
'['
and ch <=
'`'
;
27
auto
const
sec4 = ch >=
'{'
and ch <=
'~'
;
28
29
return
static_cast<
int
>
(sec1 || sec2 || sec3 || sec4);
30
}
31
}
// namespace etl
32
33
#endif
// TETL_CCTYPE_ISPUNCT_HPP
etl::ispunct
constexpr auto ispunct(int ch) noexcept -> int
Checks if the given character is a punctuation character as classified by the current C locale.
Definition
ispunct.hpp:22
etl
Definition
adjacent_find.hpp:8
include
etl
_cctype
ispunct.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0