titleCase
Converts a string to title case (each word capitalized).
titleCase
Signature
typescript
function titleCase(str: string): stringParameters
str- The string to convert
Returns
String in title case format.
Examples
typescript
import { titleCase } from 'strio'
titleCase('hello world')
// "Hello World"
titleCase('the lord of the rings')
// "The Lord Of The Rings"Related Functions
- humanize - Make human-readable
- capitalizeWords - Capitalize each word