Twig/UtilsExtension.php
public function truncateHtml($html, $limit, $endChar = '&hellip;')
    {
        $output = new TruncateHtml($html);
        return $output->cut($limit, $endChar);
    }
public function truncateHtml($html, $limit, $endChar = '&hellip;')
    {
        $output = new TruncateHtml($html);
        return $output->cut($limit, $endChar);
    }
Returns a truncated html string.

@param string $html
@param int $limit
@param string $endChar

@return string