Skip to content

Function: capitalize()

capitalize(value): string

Defined in: string.ts:15

Returns the string with its first character converted to uppercase.

Parameters

value

string

The string to capitalize.

Returns

string

The capitalized string.

Example

ts
capitalize('hello world')  // 'Hello world'
capitalize('already')      // 'Already'
capitalize('')             // ''