C++ Logo

std-proposals

Advanced search

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

From: ஜெய்கணேஷ் குமரன் <jaiganesh.kumaran_at_[hidden]>
Date: Sat, 23 Dec 2023 15:35:55 +0000
Please also provide overloads for char8_t, char16_t and char32_t that are always based on Unicode, unlike the overloads for char and wchar_t which will be locale-dependent.

On 23-Dec-2023, at 20:59, Wim Leflere via Std-Proposals <std-proposals_at_[hidden]> wrote:

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

--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2023-12-23 15:36:03