Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

uc

Converts a string to uppercase.

Returns an uppercased copy of STRING. For ASCII input, an in-place byte mutation fast path avoids allocation when a TARG pad slot is available. For Unicode input, Rust’s to_uppercase() is used, which handles case mappings that change byte length (e.g. the German sharp-s \u{00DF} becomes "SS").

Synopsis

$upper = uc($string);
$upper = uc('hello');   # "HELLO"

See Also

lc, ucfirst, lcfirst