public static function shorten($string, $limit = 25, $glue = ' &hellip; ') {
        if (mb_strlen($string) > $limit) {
            $width = round($limit / 2);

            // prefix
            $pre = mb_substr($string, 0, $width);

            if (mb_substr($pre, -1) !== ' ' && ($i = static::lastIndexOf($pre, ' '))) {
                $pre = mb_substr($pre, 0, $i);
            }

            // suffix
            $suf = mb_substr($string, -$width);

            if (mb_substr($suf, 0, 1) !== ' ' && ($i = static::indexOf($suf, ' '))) {
                $suf = mb_substr($suf, $i);
            }

            return trim($pre) . $glue . trim($suf);
        }

        return $string;
    }