The OpenD Programming Language

asCapitalized

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.

version(!std_uni_bootstrap)
asCapitalized
(
Range
)
(
Range str
)

Parameters

str Range

string or range of characters

Return Value

Type: auto

an InputRange of dchars

Examples

import std.algorithm.comparison : equal;

assert("hEllo".asCapitalized.equal("Hello"));

See Also

Meta