static function maxLengthByWords($str, $len = 50)
    {
        $str = self::removeHTMLSpecialChars($str);
        $cut = "\x1\x2\x3";
        $str = strip_tags($str);
        list($str) = explode($cut, wordwrap($str, $len, $cut));

        return $str;
    }