Strings.pascalCase()
Syntax
function pascalCase(source: string): string
Converts a string to PascalCase.
Parameters | |
source
|
A string whose casing is either snake_case, ALL_CAPS, hyphenated-case, or spaced text. Other types of casing are unsupported and may deliver unexpected results. |
Example
import { Strings } from 'potence';
Strings.pascalCase('some string'); // -> 'SomeString'
Strings.pascalCase('some-string'); // -> 'SomeString'
Strings.pascalCase('some_string'); // -> 'SomeString'
Remarks
Compare Strings.camelCase()
.