tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
iswlower.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_ISWLOWER_HPP
5#define TETL_CWCTYPE_ISWLOWER_HPP
6
7#include <etl/_cwchar/wint_t.hpp>
8
9namespace etl {
10
11/// \brief Checks if the given wide character is a lowercase letter, i.e. one of
12/// abcdefghijklmnopqrstuvwxyz or any lowercase letter specific to the current
13/// 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/iswlower
19///
20/// \ingroup cwctype
21[[nodiscard]] constexpr auto iswlower(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_ISWLOWER_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:21
Definition adjacent_find.hpp:9