tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
towlower.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CWCTYPE_TOWLOWER_HPP
4#define TETL_CWCTYPE_TOWLOWER_HPP
5
8
9namespace etl {
10
19[[nodiscard]] constexpr auto towlower(wint_t ch) noexcept -> wint_t
20{
21 if (iswupper(ch) != 0) {
22 return ch + wint_t(32);
23 }
24 return ch;
25}
26} // namespace etl
27
28#endif // TETL_CWCTYPE_TOWLOWER_HPP
constexpr auto iswupper(wint_t ch) noexcept -> int
Checks if the given wide character is an uppercase letter, i.e. one of ABCDEFGHIJKLMNOPQRSTUVWXYZ or ...
Definition iswupper.hpp:20
constexpr auto towlower(wint_t ch) noexcept -> wint_t
Converts the given wide character to lowercase, if possible.
Definition towlower.hpp:19
Definition adjacent_find.hpp:8
unsigned int wint_t
Definition wint_t.hpp:29