Skip to content

@sqlrooms/utils / capitalize

Function: capitalize() ​

capitalize(str): string

Capitalizes the first letter of string

Parameters ​

ParameterTypeDescription
strstringThe string to capitalize

Returns ​

string

A new string with the first letter capitalized

Example ​

ts
capitalize("hello world") // returns "Hello world"