Converts the given string to `StudlyCase`
@param string $string
@return string
15862
public static function studlyCase($string) {
    $string = Strings::capitalize(Strings::replace($string, ['/-/', '/_/'], ' '));
    return Strings::replace($string, '/ /');
  }
519839
protected function sensible($string)
    {
        $string = preg_replace('`([A-Z])`', '-\1', $string);
        $string = str_replace(array('-', '_'), ' ', $string);

        return ucfirst(trim(strtolower($string)));
    }
1126692
static function CamelCase($string) {
		$string = preg_replace_callback('#([_])(\w)#', function ($m) {
			return strtoupper($m[2]);
		}, strtolower($string));

		return ucfirst($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);
    }
517761
public function transform($string)
    {
        $string = preg_replace('/[^\p{L&}\p{Lo}\d]/u', $this->replacement, $string);
        $string = preg_replace('/[' . preg_quote($this->replacement) . ']+/u', $this->replacement, $string);
        $string = trim($string, $this->replacement);
        return $this->lowercase ? mb_strtolower($string) : $string;
    }
626812
protected function sluggify($string = '')
    {
        if (!empty($string)) {
            $regexs = ['/[^\w\s_.-]|\s+?/', '/-+?/'];
            $replacer = ['-', ' '];
            $string = Inflector::camelize((preg_replace($regexs, $replacer, strtolower($string))));
        }
        return $string;
    }
796493
public static function toCamelCase($str)
    {
        $str = ucwords(str_replace('_', ' ', $str));
        $str = str_replace(' ', '', lcfirst($str));
        return $str;
    }
1279024
private static function capsCase(string $string): string
    {
        $output = [];

        if (preg_match('/\A[a-z0-9]+\z/i', $string) && strtoupper($string) !== $string) {
            $parts = self::explodeOnCaps($string);
        } else {
            $parts = self::explodeOnDelims($string);
        }

        foreach ($parts as $part) {
            $output[] = ucfirst(strtolower($part));
        }

        return implode('', $output);
    }
1039744
private function sentenceCase($string)
    {
        $sentences = preg_split('/([.?!]+)/', $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
        $new_string = '';
        foreach ($sentences as $key => $sentence) {
            $new_string .= 0 === ($key & 1) ?
                ucfirst(mb_strtolower(trim($sentence))) :
                $sentence.' ';
        }

        return trim($new_string);
    }
1044360
public static function camelcaseToSnakecase(string $string): string
    {
        preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $string, $matches);

        $words = $matches[0];
        foreach ($words as &$word) {
            $word = ($word == strtoupper($word))
                ? strtolower($word)
                : lcfirst($word);
        }

        return implode('_', $words);
    }
1075240
public function apply(string $string) : string
    {
        return str_replace($this->search, $this->replace, $string);
    }
966845
public static function stringToValue($string)
	{
		if($string == '')
		{
			return $string;
		}
		if(is_float($string))
		{
			return (float) $string;
		}
		if(is_int($string))
		{
			return (int) $string;
		}
		if(strtolower($string) == 'true')
		{
			return true;
		}
		if(strtolower($string) == 'false')
		{
			return false;
		}
		if(strtolower($string) == 'null')
		{
			return NULL;
		}
		
		return $string;
	}
693076
public function camelize($string)
    {
        $string = preg_replace('#([A-Z])#', '_\\1', $string);
        $string = strtolower($string);
        $string = trim($string, '_');

        return $string;
    }
1163857
protected function trim(string $string): string
    {
        $string = preg_replace('#\s*\{\{\{\~\s*#is', '{{{', $string);
        $string = preg_replace('#\s*\~\}\}\}\s*#is', '}}}', $string);
        $string = preg_replace('#\s*\{\{\~\s*#is', '{{', $string);
        $string = preg_replace('#\s*\~\}\}\s*#is', '}}', $string);
        return $string;
    }
325662
public function toCamelCase(string $string): string
    {
        $words = \str_replace(['-', '_'], ' ', $string);

        $words = \str_replace(' ', '', \ucwords($words));

        return \lcfirst($words);
    }
1180609
public static function className($string) {
        return static::cache(array(__METHOD__, $string), function() use ($string) {
            return Inflector::camelCase(Inflector::singularize($string));
        });
    }
57164
public function normalize($string) {
		$string = $this->_normalize($string, ['clean' => true, 'case' => true]);
		return implode('-', str_split($string, $this->_partLength));
	}