xieite ::lowercase ()
Defined in fragment xieite :lowercase
(header-only:
<xieite/str/lowercase.hpp>
)
Converts every character of a string (or a single character) to lowercase.
Only handles the English alphabet.
Declarations
#0Makes a single character lowercase. Internally uses a lookup table.template <xieite ::is_ch Ch =char > [[nodiscard ]]constexpr Ch lowercase (Ch c )noexcept ;
#1
Makes an entire string lowercase. Internally uses #0.template <typename Ch =char ,typename Traits =std ::char_traits <Ch >,typename Alloc =std ::allocator <Ch >> [[nodiscard ]]constexpr std ::basic_string <Ch ,Traits ,Alloc >lowercase (std ::basic_string_view <Ch ,Traits >str )noexcept ;
Example
Output:import std ;import xieite ;int main () {using std ::operator "" sv;xieite ::dump (xieite ::lowercase ("HeLlO, wOrLd!" sv)); }
[View in Compiler Explorer]hello, world!