tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
isupper.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2020 Tobias Hienzsch
3
4#ifndef TETL_CCTYPE_ISUPPER_HPP
5#define TETL_CCTYPE_ISUPPER_HPP
6
7namespace etl {
8
9/// \brief Checks if the given character is classified as a uppercase character
10/// according to the default C locale.
11///
12/// \param ch Character to classify.
13///
14/// \returns Non-zero value if the character is a uppercase letter, zero
15/// otherwise.
16///
17/// https://en.cppreference.com/w/cpp/string/byte/isupper
18///
19/// \ingroup cctype
20[[nodiscard]] constexpr auto isupper(int ch) noexcept -> int
21{
22 return static_cast<int>(ch >= 'A' and ch <= 'Z');
23}
24
25} // namespace etl
26
27#endif // TETL_CCTYPE_ISUPPER_HPP
constexpr auto isupper(int ch) noexcept -> int
Checks if the given character is classified as a uppercase character according to the default C local...
Definition isupper.hpp:20
Definition adjacent_find.hpp:9