Function to_lowercase


#include "breeze/text/to_lowercase.hpp"

std::string to_lowercase(std::string const &source, std::locale const &loc=std::locale())


Converts each character in source to lowercase, using the ctype facet of the given locale. Only 1:1 character mapping can be performed: for instance, the uppercase Greek letter sigma has two lowercase forms, which are chosen depending on whether they are the final letter of a word or not; this function cannot handle this.

Naming rationale
I was a bit hesitant between the names "to_lower_case" and "to_lowercase". The issue is being consistent in the documentation: separating "lower" and "case" would mean using a space between the two words for usage as a noun, and a hyphen, instead, for usage as an adjective. This is error-prone. So I decided to use the spelling "lowercase" everywhere: code and documentation.

This is also consistent with the stream manipulator std::uppercase.



Line 48 in breeze/text/to_lowercase.hpp.