public static function shortenString($str, $length = 75, $break = '...') {
        if (strlen($str) < $length)
            return $str;

        $str = strip_tags($str);

        return substr($str, 0, $length) . $break;
    }
public static function shortenString($str, $length = 75, $break = '...') {
        if (strlen($str) < $length)
            return $str;

        $str = strip_tags($str);

        return substr($str, 0, $length) . $break;
    }
public static function shortenString ( $ str , $ length = 75 , $ break = '...' ) { if ( strlen ( $ str ) < $ length ) return $ str ; $ str = strip_tags ( $ str ) ; return substr ( $ str , 0 , $ length ) . $ break ; }
Shortens a string to desired length
@param string $str String to shorten
@param integer $length Length of the string to return
@param string $break String to replace the truncated part with
@return string
Shortens a string to desired length