tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
iswupper.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_CWCTYPE_ISWUPPER_HPP
5#define TETL_CWCTYPE_ISWUPPER_HPP
6
7#include <etl/_cwchar/wint_t.hpp>
8
9namespace etl {
10
11/// \brief Checks if the given wide character is an uppercase letter, i.e. one
12/// of ABCDEFGHIJKLMNOPQRSTUVWXYZ or any uppercase letter specific to the
13/// current locale.
14///
15/// \details If the value of ch is neither representable as a wchar_t nor equal
16/// to the value of the macro WEOF, the behavior is undefined.
17///
18/// https://en.cppreference.com/w/cpp/string/wide/iswupper
19///
20/// \ingroup cwctype
21[[nodiscard]] constexpr auto iswupper(wint_t ch) noexcept -> int
22{
23 return static_cast<int>(ch >= L'A' && ch <= L'Z');
24}
25
26} // namespace etl
27
28#endif // TETL_CWCTYPE_ISWUPPER_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:21
Definition adjacent_find.hpp:9