startCase
Convert a string to Start Case, capitalizing each word and separating them with spaces, ideal for readable titles and headings.
Usage
Converts a string to Start Case format (each word capitalized, separated by spaces).
import { startCase } from '@movk/core'
startCase('firstName') // => 'First Name'
startCase('first_name') // => 'First Name'
startCase('first-name') // => 'First Name'
startCase('XMLHttpRequest') // => 'XML Http Request'
API
startCase(str: string): string
Parameters
str
string required
The string to convert.
Returns
string
Returns the string in Start Case format.
Changelog
No recent changes