@tempots/std

capitalizeWords() function

Capitalize the first letter of every word in value. If whiteSpaceOnly is set to true the process is limited to whitespace separated words.

Signature:

capitalizeWords: (value: string, whiteSpaceOnly?: boolean) => string

Parameters

Parameter

Type

Description

value

string

The string to capitalize.

whiteSpaceOnly

boolean

(Optional) If true, only whitespace separated words will be capitalized.

Returns: string

The string with the first letter of each word capitalized.