public function toSlugUtf8(string $separator = '-'): Utility
    {
        $string = mb_convert_encoding($this->string, 'UTF-8', $this->encoding);
        $string = preg_replace('/[^\s\p{L}0-9\-' . $separator . ']/u', '', $string);
        $string = preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', $string);
        $string = preg_replace('/[\s_\-]/', $separator, $string);
        $string = trim($string, $separator);
        $string = mb_strtolower($string, 'utf-8');
        return new static($string, $this->encoding);
    }
public function toSlugUtf8(string $separator = '-'): Utility
    {
        $string = mb_convert_encoding($this->string, 'UTF-8', $this->encoding);
        $string = preg_replace('/[^\s\p{L}0-9\-' . $separator . ']/u', '', $string);
        $string = preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', $string);
        $string = preg_replace('/[\s_\-]/', $separator, $string);
        $string = trim($string, $separator);
        $string = mb_strtolower($string, 'utf-8');
        return new static($string, $this->encoding);
    }
public function toSlugUtf8 ( string $ separator = '-' ) : Utility { $ string = mb_convert_encoding ( $ this -> string , 'UTF-8' , $ this -> encoding ) ; $ string = preg_replace ( '/[^\s\p{L}0-9\-' . $ separator . ']/u' , '' , $ string ) ; $ string = preg_replace ( '~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i' , '$1' , $ string ) ; $ string = preg_replace ( '/[\s_\-]/' , $ separator , $ string ) ; $ string = trim ( $ string , $ separator ) ; $ string = mb_strtolower ( $ string , 'utf-8' ) ; return new static ( $ string , $ this -> encoding ) ; }
Same as toSlug but preserves UTF8 characters

@param string $separator Value to separate chunks with

@return $this
Same as toSlug but preserves UTF8 characters