src/Ultra/Helpers/Data.php
public static function spaceToCamelCase($string, $type = '_', $first_char_caps = false)
    {
        if($first_char_caps === true)
        {
            $string[0] = strtoupper($string[0]);
        }

        $func = create_function('$c', 'return strtoupper($c[1]);');

        return preg_replace_callback('/' . $type . '([a-z])/', $func, $string);
    }
public static function spaceToCamelCase($string, $type = '_', $first_char_caps = false)
    {
        if($first_char_caps === true)
        {
            $string[0] = strtoupper($string[0]);
        }

        $func = create_function('$c', 'return strtoupper($c[1]);');

        return preg_replace_callback('/' . $type . '([a-z])/', $func, $string);
    }
public static function spaceToCamelCase ( $ string , $ type = '_' , $ first_char_caps = false ) { if ( $ first_char_caps === true ) { $ string [ 0 ] = strtoupper ( $ string [ 0 ] ) ; } $ func = create_function ( '$c' , 'return strtoupper($c[1]);' ) ; return preg_replace_callback ( '/' . $ type . '([a-z])/' , $ func , $ string ) ; }
Convert strings with an arbitrary deliminator into CamelCase.

@param string $string The string to convert
@param string $type The deliminator to replace
@param bool $first_char_caps camelCase or CamelCase
@return string The converted string
Convert strings with an arbitrary deliminator into CamelCase .