Capitalize an input range or string, meaning convert the first character to upper case and subsequent characters to lower case.
Does not allocate memory. Characters in UTF-8 or UTF-16 format that cannot be decoded are treated as std.utf.replacementDchar.
string or range of characters
an InputRange of dchars
import std.algorithm.comparison : equal; assert("hEllo".asCapitalized.equal("Hello"));
toUpper, toLower asUpperCase, asLowerCase
See Implementation
Capitalize an input range or string, meaning convert the first character to upper case and subsequent characters to lower case.
Does not allocate memory. Characters in UTF-8 or UTF-16 format that cannot be decoded are treated as std.utf.replacementDchar.