title
@guoba-ai/utils / string / title
Function: title()
function title(str): string;Defined in: string.ts:181
Convert a string to Title Case. Each word is capitalized and joined with a space.
Parameters
str
string
The string to convert
Returns
string
The Title Case version of the string
Example
title('foo bar') // 'Foo Bar'
title('foo-bar') // 'Foo Bar'
title('fooBar') // 'Foo Bar'