toUpper

Converts an ASCII letter to uppercase.

toUpper
(
C
)
(
C c
)
if (
is(C : dchar)
)

Return Value

Type: auto

The corresponding uppercase letter, if c is a lowercase ASCII character, otherwise c itself.

Examples

assert(toUpper('a') == 'A');
assert(toUpper('A') == 'A');
assert(toUpper('#') == '#');

// N.B.: Non-ASCII Unicode lowercase letters are not converted.
assert(toUpper('á') == 'á');

Meta