C++ Logo

std-proposals

Advanced search

[std-proposals] More idiomatic std::islower/std::iswlower

From: Wim Leflere <wim.leflere_at_[hidden]>
Date: Sat, 23 Dec 2023 16:29:59 +0100
Would there be interest in having more idiomatic versions of the character
check functions (from cctype
<https://en.cppreference.com/w/cpp/header/cctype> & cwctype
<https://en.cppreference.com/w/cpp/header/cwctype>)?

Example
Replace
"int std::islower(int ch)" and "int std::iswlower(std::wint_t ch)"
With
"bool std::is_lower(char ch)" and "bool std::is_lower(wchar_t ch)"

Using overloads allows use in a more generic way.
The implementation could call the C function (in the correct way).

Wim

Received on 2023-12-23 15:30:12