Skip to main content

Function: toTitleCase()

toTitleCase(str: string, options: ToTitleCaseOptions): string

Defined in: toTitleCase.ts:35

Converts a string to Title Case

Parameters​

ParameterTypeDescription
strstringThe string to title case
optionsToTitleCaseOptionsThe options to use when converting the string

Returns​

string

Description​

This is designed to also ensure common Discord PascalCased strings are put in their TitleCase toTitleCaseDiscordJsVariants.

You can also provide your own variants to merge with the toTitleCaseDiscordJsVariants for your own functionality use.