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

1 assert(toUpper('a') == 'A');
2 assert(toUpper('A') == 'A');
3 assert(toUpper('#') == '#');
4 
5 // N.B.: Non-ASCII Unicode lowercase letters are not converted.
6 assert(toUpper('á') == 'á');

Meta