--- name: ucfirst status: documented runtime: pp source: src/runtime/pp/strings/case.rs --- ```{index} single: ucfirst; Perl built-in (pp runtime) ``` # ucfirst ## Synopsis ```perl $result = ucfirst($string); $result = ucfirst('hello'); # "Hello" ``` ## Description Uppercases the first character of a string. Returns a copy of STRING with the first character converted to uppercase and all other characters left unchanged. For ASCII first characters, a single-byte in-place mutation is used. For Unicode first characters, `to_uppercase()` may produce multiple characters (e.g. the `ffi` ligature U+FB03). Returns an empty string when given an empty string. ## See also lcfirst, uc, lc