|
template<char_like T> |
constexpr bool | islower (T ch) |
| constexpr re-implementation of std::islower .
|
|
template<char_like T> |
constexpr bool | issuper (T ch) |
| constexpr re-implementation of std::issuper .
|
|
template<char_like T> |
constexpr bool | isdigit (T ch) |
| constexpr re-implementation of std::isdigit .
|
|
template<char_like T> |
constexpr bool | isalpha (T ch) |
| constexpr re-implementation of std::isalpha .
|
|
template<char_like T> |
constexpr bool | isalnum (T ch) |
| constexpr re-implementation of std::isalnum .
|
|
template<char_like T> |
constexpr bool | isxdigit (T ch) |
| constexpr re-implementation of std::isxdigit .
|
|
template<char_like T> |
constexpr bool | iscntrl (T ch) |
| constexpr re-implementation of std::iscntrl .
|
|
template<char_like T> |
constexpr bool | ispunct (T ch) |
| constexpr re-implementation of std::ispunct .
|
|
template<char_like T> |
constexpr bool | isblank (T ch) |
| constexpr re-implementation of std::isblank .
|
|
template<char_like T> |
constexpr bool | isspace (T ch) |
| constexpr re-implementation of std::isspace .
|
|
template<char_like T> |
constexpr bool | isgraph (T ch) |
| constexpr re-implementation of std::isgraph .
|
|
template<char_like T> |
constexpr bool | isprint (T ch) |
| constexpr re-implementation of std::isprint .
|
|
template<char_like T> |
constexpr char | toupper (T ch) |
| constexpr re-implementation of std::toupper .
|
|
template<char_like T> |
constexpr char | tolower (T ch) |
| constexpr re-implementation of std::tolower .
|
|
template<char_like T> |
constexpr char | invert (T ch) |
| Invert case of letter.
|
|
template<char_like auto... Chs>
requires meta::all_same_of<Chs...> && (sizeof...(Chs) > 1) |
constexpr bool | is (meta::first_t_of< Chs... > ch) |
| Check if input character the same as one of variable template parameters. More...
|
|
template<char_like auto Ch> |
constexpr decltype(Ch) | just (decltype(Ch) ignored) |
| No matter what the input is, always output Ch . More...
|
|
template<char_like auto... Chs>
requires meta::all_same_of<Chs...> && (sizeof...(Chs) > 1) |
constexpr meta::last_t_of< Chs... > | replace (meta::last_t_of< Chs... > ch) |
| Replace the input character if it is the same as one of variable template parameters. More...
|
|
template<char_like auto... Chs>
requires meta::all_same_of<Chs...> && (sizeof...(Chs) > 1) |
constexpr meta::last_t_of< Chs... > | remain (meta::last_t_of< Chs... > ch) |
| Replace the input character if it is NOT one of variable template parameters. More...
|
|
Some constexpr character operating functions.
template<char_like auto... Chs>
requires meta::all_same_of<Chs...> && (sizeof...(Chs) > 1)
Replace the input character if it is NOT one of variable template parameters.
It is the opposite function of replace<Chs...>(ch)
. For example, remain<'a', 'b', 'c', 'z'>(ch)
will return 'z'
if ch
is NOT one of 'a'
, 'b'
or 'c'
, otherwise return ch
itself. This function can be used as a unary operation parameter for many standard library algorithms in constant context. For example:
constexpr auto iter = std::transform(start, end, start, remain<'-', '*'>);
- Template Parameters
-
Chs | list of expected characters |
- Parameters
-
ch | characters to be checked |
- Returns
- The last value of variable template parameters if
ch
is NOT one of them, otherwise the value of ch
.
template<char_like auto... Chs>
requires meta::all_same_of<Chs...> && (sizeof...(Chs) > 1)
Replace the input character if it is the same as one of variable template parameters.
For example, replace<'a', 'b', 'c', 'z'>(ch)
will return 'z'
if ch
is 'a'
, 'b'
or 'c'
, otherwise return ch
itself. This function can be used as a unary operation parameter for many standard library algorithms in constant context. For example:
constexpr auto iter = std::transform(start, end, start, replace<'A', 'a'>);
- Template Parameters
-
Chs | list of expected characters |
- Parameters
-
ch | characters to be checked |
- Returns
- The last value of variable template parameters if
ch
is one of them, otherwise the value of ch
.