English
Appearance
Converts the first character of str to upper case and the remaining characters to lower case.
str
Signature:
declare function capitalize(str: string): string;
capitalize("fred"); // "Fred" capitalize("FRED"); // "Fred" capitalize(""); // ""
Open Source Code