src/Renderer/Twig/Extension.php
public function excerpt($string, $length = 450, $suffix = ' …')
    {
        $string = str_replace('</p>', '<br /><br />', $string);
        $string = trim(strip_tags($string, '<br>'), '<br />');
        if (mb_strlen($string) > $length) {
            $string = mb_substr($string, 0, $length);
            $string .= $suffix;
        }

        return $string;
    }
public function excerpt($string, $length = 450, $suffix = ' …')
    {
        $string = str_replace('</p>', '<br /><br />', $string);
        $string = trim(strip_tags($string, '<br>'), '<br />');
        if (mb_strlen($string) > $length) {
            $string = mb_substr($string, 0, $length);
            $string .= $suffix;
        }

        return $string;
    }
Read $lenght first characters of a string and add a suffix.

@param $string
@param int    $length
@param string $suffix

@return string