Converts a string to title case, where only the first letter of the entire string is capitalized. This is locale-aware if a locale is provided.
The string to convert
Optional
Optional locale for capitalization rules
The title-cased string
toTitleCase('HELLO WORLD'); // 'Hello world' Copy
toTitleCase('HELLO WORLD'); // 'Hello world'
Converts a string to title case, where only the first letter of the entire string is capitalized. This is locale-aware if a locale is provided.