Skip to content

toPascalCase() ​

Import from
@gabreusi/hyrax
Examples
Run, answers asserted
ts
function toPascalCase(input: string): string;

Defined in: core/string.ts:61

Converts a string to PascalCase.

Parameters ​

ParameterTypeDescription
inputstringThe string to convert.

Returns ​

string

The PascalCase string.

Example ​

ts
toPascalCase("hello world");   // => "HelloWorld"
toPascalCase("foo_bar");       // => "FooBar"

MIT License. Every example on these pages is type-checked against the built package, and the core ones are run.