tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
toupper.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CCTYPE_TOUPPER_HPP
4#define TETL_CCTYPE_TOUPPER_HPP
5
7
8namespace etl {
9
26[[nodiscard]] constexpr auto toupper(int ch) noexcept -> int
27{
28 if (etl::islower(ch) != 0) {
29 return static_cast<int>(ch - 32);
30 }
31 return static_cast<int>(ch);
32}
33} // namespace etl
34
35#endif // TETL_CCTYPE_TOUPPER_HPP
constexpr auto islower(int ch) noexcept -> int
Checks if the given character is classified as a lowercase character according to the default C local...
Definition islower.hpp:19
constexpr auto toupper(int ch) noexcept -> int
Converts the given character to uppercase according to the character conversion rules defined by the ...
Definition toupper.hpp:26
Definition adjacent_find.hpp:8