method toCamel documentation in bbn\Str

Converts the given string to camel case.

Example

var_dump(\bbn\Str::toCamel("foo bar")); // (string) 'fooBar' function(string $st, string $sep = '_', bool $first = false) { $st = strtolower($st); $res = str_replace(' ', '', ucwords(str_replace($sep, ' ', $st))); if (!$first) { $res[0] = strtolower($res[0]); } return $res; }

Converts the given string to camel case. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.