Transforms the first character to uppercase.

Type signature

(text: string) => string

Examples

firstToUpper("teSt");
// ⇒ "TeSt"
Try in REPL

Questions

  • How to make the first letter of a string uppercase?

TypeScript sourceJavaScript source