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