public static function stringTrim(string $string, int $length): string
    {
        if ($length<16) return $string;
        if (strlen($string)>$length) {
            $str_head = substr($string, 0, $length-10);
            $str_tail = substr($string, -7, 7);
            return $str_head.'...'.$str_tail;
        }
        return $string;
    }