public static function removeAccents($string, $language = ''): string
    {
        if (!preg_match('/[\x80-\xff]/', $string)) {
            return $string;
        }

        return self::downCode($string, $language);
    }
public static function removeAccents($string, $language = ''): string
    {
        if (!preg_match('/[\x80-\xff]/', $string)) {
            return $string;
        }

        return self::downCode($string, $language);
    }
public static function removeAccents ( $ string , $ language = '' ) : string { if ( ! preg_match ( '/[\x80-\xff]/' , $ string ) ) { return $ string ; } return self :: downCode ( $ string , $ language ) ; }
Converts all accent characters to ASCII characters.
If there are no accent characters, then the string given is just returned.

@param  string $string   Text that might have accent characters
@param  string $language Specifies a priority for a specific language.
@return string Filtered  string with replaced "nice" characters
Converts all accent characters to ASCII characters . If there are no accent characters then the string given is just returned .