1public static function camelCase($str, array $noStrip = [])
2{
3 // non-alpha and non-numeric characters become spaces
4 $str = preg_replace('/[^a-z0-9' . implode("", $noStrip) . ']+/i', ' ', $str);
5 $str = trim($str);
6 // uppercase the first character of each word
7 $str = ucwords($str);
8 $str = str_replace(" ", "", $str);
9 $str = lcfirst($str);
10
11 return $str;
12}