Mecha CMS

To::camel()

Convert string input into camelCase.

2.0.0Static

To::camel(string $in);

Example:

$A = To::camel('foo bar baz');
$B = To::camel('foo-bar-baz');
$C = To::camel('Foo Bar BAZ');
$D = To::camel('foO baR baz');
$E = To::camel('foo_bar_baz');

Result:

$A = 'fooBarBaz';
$B = 'fooBarBaz';
$C = 'FooBarBAZ';
$D = 'foOBaRBaz';
$E = 'fooBarBaz';