capitalize (source code)
- Curried: false
- Failsafe status: alternative available
The capitalize
function converts the first character of a string to uppercase.
string
: The string to be converted.
capitalize("oliver"); // "Oliver"
capitalize("OLIVER"); // "OLIVER"
capitalize("oLIVER"); // "OLIVER"