Core/Toolbox/Strings/CamelCase.php
/**
     * Converts strings with underscores into case sensitiv strings
     *
     * @param bool $upper_first
     *
     * @return string
     */
Converts strings with underscores into case sensitiv strings
@param bool $upper_first

@return string
Converts strings with underscores into case sensitiv strings @param bool $upper_first @return string
function camelize(bool $upper_first = true): string
    {
        if (empty($this->string)) {
            Throw new \InvalidArgumentException('The string set to be camelized is empty.');
        }
        if (strpos($this->string, '_') == 0 && $upper_first == true) {
            $this->result = ucwords($this->string);
        }
        else {
            $this->result = str_replace(' ', '', ucwords(str_replace('_', ' ', strtolower($this->string))));
            if ($upper_first == false) {
                $this->result = lcfirst($this->result);
            }
        }
        return $this->result;
    }
function camelize ( bool $ upper_first = true ) : string { if ( empty ( $ this -> string ) ) { Throw new \ InvalidArgumentException ( 'The string set to be camelized is empty.' ) ; } if ( strpos ( $ this -> string , '_' ) == 0 && $ upper_first == true ) { $ this -> result = ucwords ( $ this -> string ) ; } else { $ this -> result = str_replace ( ' ' , '' , ucwords ( str_replace ( '_' , ' ' , strtolower ( $ this -> string ) ) ) ) ; if ( $ upper_first == false ) { $ this -> result = lcfirst ( $ this -> result ) ; } } return $ this -> result ; }
Converts strings with underscores into case sensitiv strings
 @param bool $upper_first
Converts strings with underscores into case sensitiv strings @param bool $upper_first
// even if there is no underscore in string, the first char will be converted to uppercase