🖋️ Converts a string to Title Case.
Syntax
TypeScript
import { titleCase } from '@opentf/std'; titleCase(str: string): string
Parameters
str: The string to convert.
Returns
The title-cased string.
Examples
TypeScript
titleCase('hello world') //=> 'Hello World' titleCase('foo-bar') //=> 'Foo Bar' titleCase('the quick brown fox') //=> 'The Quick Brown Fox' titleCase('__FOO_BAR__') //=> 'Foo Bar'