tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
isalpha.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CCTYPE_ISALPHA_HPP
4#define TETL_CCTYPE_ISALPHA_HPP
5
6namespace etl {
18[[nodiscard]] constexpr auto isalpha(int ch) noexcept -> int
19{
20 auto const isLower = ch >= 'a' and ch <= 'z';
21 auto const isUpper = ch >= 'A' and ch <= 'Z';
22
23 return static_cast<int>(isLower or isUpper);
24}
25} // namespace etl
26
27#endif // TETL_CCTYPE_ISALPHA_HPP
constexpr auto isalpha(int ch) noexcept -> int
Checks if the given character is an alphabetic character as classified by the default C locale.
Definition isalpha.hpp:18
Definition adjacent_find.hpp:8