src/Initials.php
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);
    }
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);
    }
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 ) ; }
Converts specialcharacters to url-friendly characters.

Copied from: https://github.com/laravel/framework/blob/5.4/src/Illuminate/Support/Str.php#L56

@param $string

@return string
Converts specialcharacters to url - friendly characters .