public function toCamelCase(): Utility
    {
        // separate existing joined words
        $string = preg_replace('/([a-z0-9])(?=[A-Z])/', '$1 ', $this->string);

        $words = preg_split('/[\W_]/', $string);

        $words = array_map(function ($word) {
            return ucfirst(strtolower($word));
        }, $words);

        $string = lcfirst(implode('', $words));

        return new static($string, $this->encoding);
    }
public function toCamelCase(): Utility
    {
        // separate existing joined words
        $string = preg_replace('/([a-z0-9])(?=[A-Z])/', '$1 ', $this->string);

        $words = preg_split('/[\W_]/', $string);

        $words = array_map(function ($word) {
            return ucfirst(strtolower($word));
        }, $words);

        $string = lcfirst(implode('', $words));

        return new static($string, $this->encoding);
    }
public function toCamelCase ( ) : Utility { // separate existing joined words $ string = preg_replace ( '/([a-z0-9])(?=[A-Z])/' , '$1 ' , $ this -> string ) ; $ words = preg_split ( '/[\W_]/' , $ string ) ; $ words = array_map ( function ( $ word ) { return ucfirst ( strtolower ( $ word ) ) ; } , $ words ) ; $ string = lcfirst ( implode ( '' , $ words ) ) ; return new static ( $ string , $ this -> encoding ) ; }
Transform the value to into camelCase format

@return $this
Transform the value to into camelCase format