Mecha CMS

To::pascal()

Convert string into PascalCase.

2.0.0Static

To::pascal(string $in);

Example:

$A = To::pascal('foo bar baz');
$B = To::pascal('foo-bar-baz');
$C = To::pascal('foo_bar_baz');
$D = To::pascal('Foo Bar Baz');
$E = To::pascal('FooBarBaz');

Result:

$A = 'FooBarBaz';
$B = 'FooBarBaz';
$C = 'FooBarBaz';
$D = 'FooBarBaz';
$E = 'FooBarBaz';