library/Extlib/Utils.php
public function shortText($text, $length)
    {
        $text = trim($text);
        $charset = mb_detect_encoding($text);

        if (mb_strlen($text, $charset) > $length) {
            $text = mb_substr($text, 0, $length, $charset) . '...';
        } else {
            $text = $text;
        }

        return $text;
    }
public function shortText($text, $length)
    {
        $text = trim($text);
        $charset = mb_detect_encoding($text);

        if (mb_strlen($text, $charset) > $length) {
            $text = mb_substr($text, 0, $length, $charset) . '...';
        } else {
            $text = $text;
        }

        return $text;
    }
public function shortText ( $ text , $ length ) { $ text = trim ( $ text ) ; $ charset = mb_detect_encoding ( $ text ) ; if ( mb_strlen ( $ text , $ charset ) > $ length ) { $ text = mb_substr ( $ text , 0 , $ length , $ charset ) . '...' ; } else { $ text = $ text ; } return $ text ; }
Return short text

@param string $text
@param integer $length

@return string
Return short text