String
pascalCase

🐫 Converts string to pascal case.

Syntax

import { pascalCase } from '@opentf/std';
 
pascalCase(str: string): string;

Parameters

  • str: The string to convert.

Returns

The pascal-cased string.

Examples

pascalCase('Foo Bar') //=> 'FooBar'
 
pascalCase('--foo-bar--') //=> 'FooBar'
 
pascalCase('__FOO_BAR__') //=> 'FooBar'

Related

Try