Convert string to CamelCase
@param string $string
@return string
488944
public function bumpyCase($string)
    {
        $words = explode('_', $string);
        foreach ($words as &$word) {
            $word = ucfirst($word);
        }
        unset ($word);
        
        $camelCase = implode('', $words);
        return $camelCase;
    }
1075240
public function apply(string $string) : string
    {
        return str_replace($this->search, $this->replace, $string);
    }
31918
public static function camelCase($value)
  {
    $value = ucwords(str_replace(array('-', '_'), ' ', $value));
    $value = str_replace(' ', '', $value);
    $value[0] = strtolower($value[0]);
    return $value;
  }
496796
private function stringToUsernameChunk($string)
    {
        $string = trim((string) $string);
        $string = preg_replace('/[^a-z0-9]+/', '_', strtolower($string));
        $string = preg_replace('/__+/', '_', $string);
        $string = trim($string, '_');

        return $string;
    }
330151
def _to_camel_case(string):
        
        components = string.split('_')
        return '%s%s' % (
            components[0],
            ''.join(c.title() for c in components[1:]),
        )
27604
public static function fromCamelCaseToDashConnection($string)
    {
        $return = preg_replace_callback('/([A-Z])/', function($matches){
            return '-' . ucwords(strtolower($matches[1]));
        }, $string);

        if (substr($return, 0,1) === '-') {
            $return = substr($return, 1, strlen($return));
        }

        return $return;
    }
1241713
private static function toCamelCase(string $text): string
    {
        if (strpos($text, '_') !== false) {
            $text = str_replace(' ', '', ucwords(str_replace('_', ' ', $text)));
        }
        $text[0] = strtolower($text[0]);

        return $text;
    }
393411
private function convertToUrlFriendlyString($string)
    {
        foreach (static::charsArray() as $key => $val) {
            $string = str_replace($val, mb_substr($key, 0, 1), $string);
        }

        return preg_replace('/[^\x20-\x7E]/u', '', $string);
    }
310674
public function toPascalCase(string $string): string
    {
        $string = Transliterator::urlize((string)$string);
        $string = str_replace('-', '', ucwords($string, '-'));

        return $string;
    }
989087
protected function convertString($string)
    {
        $charset = strtolower($this->getCharset());
        if (!in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) {
            return mb_convert_encoding($string, $charset, 'utf-8');
        }

        return $string;
    }
561470
public function camelizeBundle($string)
    {
        $string = $this->camelize($string);
        $string = str_replace('_bundle', '', $string);

        return $string;
    }
849890
public static function toCamelCase($string) {
		static $canUse = null;
		if (is_null($canUse)) {
			$canUse = method_exists(Strings::class, 'firstLower'); // Nette/Utils >= 2.3 only
		}
		$pascal = self::toPascalCase($string);
		return $canUse
			? Strings::firstLower($pascal)
			: Strings::lower(Strings::substring($pascal, 0, 1)) . Strings::substring($pascal, 1);
	}
394264
public static function camelCaseToSeparated($string, $separator = '-', $toLowerCase = true)
    {
        $separated = preg_replace(['/([a-z\d])([A-Z])/', '/([^' . preg_quote($separator) . '])([A-Z][a-z])/'], '$1' . $separator . '$2', $string);
        return $toLowerCase ? strtolower($separated) : $separated;
    }
238721
public static function strtotitle(string $string): string
    {
        $result = '';
        $splitIntoLowerCaseWords = preg_split("/([\n\r\t ])/", self::strtolower($string), -1, PREG_SPLIT_DELIM_CAPTURE);
        foreach ($splitIntoLowerCaseWords as $delimiterOrValue) {
            $result .= self::strtoupper(self::substr($delimiterOrValue, 0, 1)) . self::substr($delimiterOrValue, 1);
        }
        return $result;
    }
1026755
public static function to_snake($string)
    {
        if (\ctype_lower($string)) {
            return $string;
        }

        $string = \preg_replace('/\s+/u', '', \ucwords($string));

        $string = \trim(\preg_replace('/([^_])(?=[A-Z])/', '$1_', $string), '_');

        return \strtolower($string);
    }
946177
public static function camelize( $string , $upper = true ) {

        if ( $upper )
            $string = preg_replace_callback( '/^[a-z0-9]+/' , function( $find ){ return self::capitalize( $find[0] ); } , $string );
        else
            $string = preg_replace_callback( '/^[a-z0-9]+/' , function( $find ){ return strtolower( $find[0] ); } , $string );

        $string = preg_replace_callback( '/(_|\\/)([a-z0-9]+)/' , function( $find ){

            return self::capitalize( $find[2] );

        } , $string );

        $string = str_replace( '/' , '::' , $string );

        return $string;

    }
947696
public static function underscoreToCamelCase($string)
    {
        static $cache = array();

        if (array_key_exists($string, $cache) == true) {
            return $cache[$string];
        }

        $replacer = function(array $matches) {
            return strtoupper($matches[1]);
        };

        return $cache[$string] = preg_replace_callback('/_(.?)/', $replacer, $string);
    }