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

#0
template<xieite::is_ch Ch = char>
[[nodiscard]] constexpr Ch lowercase(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>>
[[nodiscard]] constexpr std::basic_string<Ch, Traits, Alloc> lowercase(std::basic_string_view<Ch, Traits> str) noexcept;
Makes an entire string lowercase. Internally uses #0.


Example

import std;
import xieite;

int main() {
	using std::operator""sv;

	xieite::dump(xieite::lowercase("HeLlO, wOrLd!"sv));
}
Output:
hello, world!
[View in Compiler Explorer]