clean-jsdoc-theme TypeDoc APIv0.0.0

capitalize

capitalize(str: string): string

Source: string.ts:25

Capitalizes the first letter of a string

Parameters

  • str (string) — The input string

Returns

  • string — String with first letter capitalized

Example

CODE
capitalize('hello') // 'Hello'
capitalize('WORLD') // 'WORLD'
capitalize('') // ''