std::regex_...slate_nocase(3)
π std::regex_...slate_nocase(3) π
okay so bestie, welcome to the C++ Standard Libary manual page titled std::regex_...slate_nocase(3) β yes, the title is giving truncated-era drama, but the actual function we're talking about is std::regex_traits::translate_nocase, and it is here to serve case-insensitive comparison-key realness. π
β¨
πͺ© NAME
std::regex_traits::translate_nocase-std::regex_traits::translate_nocaseβ yep, the name is also the name again. it's giving echo but make it iconic. π«Ά
β¨ Synopsis β¨
CharT translate_nocase( CharT c ) const;
okay so what does it do? It obtains the comparison key for the character c, such that all characters that are equivalent to this character in the imbued locale, ignoring the case differences, if any, produce the same key. literally key-match energy. π
When the regex library needs to match two characters c1 and c2 and the flag std::regex_constants::icase is true, it executes:
regex_traits<>::translate_nocase(c1) ==
regex_traits<>::translate_nocase(c2)
Standard library specializations of std::regex_traits return:
std::use_facet<std::ctype<CharT>>(getloc()).tolower(c)
that is, convert c to lowercase, using the currently imbued locale. no cap, that's the whole glow-up. πΈ
π Parameters π
cβ character that needs to be examined for equivalence, ignoring case. bestie is under case-insensitive investigation π
π Return value π
The case-insensitive comparison key for c in the currently imbued locale. that's the vibe check result, periodt. π
π¦ Example π¦
This section is incomplete Reason: no example
bestie, we are collectively crying in the group chat π no example yet.
ποΈ Category
Todo no example
kisses from http://cppreference.com, version/date 2024.06.10, original page std::regex_...slate_nocase(3) β bye bestie, slay your regexes safely π«Άπβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms