xieite::lower()

Defined in fragment xieite:lower
(header-only: <xieite/str/lower.hpp>)


Converts every character of a string (or a single character) to lowercase.
Only handles the English alphabet.


Declarations

#0
template<xieite::is_ch Ch = char>
[[nodiscard]] constexpr Ch lower(Ch c) noexcept;
Makes a single character lowercase. Internally uses a lookup table.

#1
template<typename Ch = char, typename Traits = std::char_traits<Ch>, typename Alloc = std::allocator<Ch>,
	xieite::end...,
	typename Str = std::basic_string<Ch, Traits, Alloc>>
[[nodiscard]] constexpr Str lower(Str str) noexcept;
Makes an entire string lowercase. Internally uses #0.


Example

import xieite;

int main() {
	xieite::dump(xieite::lower("HeLlO, wOrLd!"));
}
Output:
hello, world!