CapitalizeFirst

Function: capitalizeFirst()

[object Object]

Defined in: util/string.util.ts:10

Uppercases the first character of a string, leaving the rest untouched. Some locales (e.g. Dutch) render weekday names/abbreviations lowercase by default, which is only correct when the weekday isn't the first word of the sentence it appears in - callers should apply this at the specific call sites where a formatDate result actually starts the sentence, not unconditionally.

Parameters

str

[object Object]

The string to capitalize.

Returns

[object Object]

The string with its first character uppercased.

On this page