Defined in header <cparse/Generator.hh>

virtual std::string convertLowerCase( std::string const& base ) const noexcept;

Returns a copy of base with every ASCII letter replaced by its lower-case equivalent. Non-letter bytes and non-ASCII bytes are passed through unchanged.

Implemented via std::transform with std::tolower — locale-free, byte-for-byte.

Parameters

ParameterDescription
baseThe input string. Not mutated.

Return value

A new string of the same length as base.

Exceptions

noexcept.

Notes

Byte-oriented, not Unicode-aware. For a UTF-8 string, the ASCII letters are lower-cased but multi-byte sequences (Turkish İ, German ß, etc.) are passed through untouched — you will not get i and ß/ss where a locale-aware routine would.

For file extensions and other identifier fragments where only ASCII matters, this is exactly what you want.

See also