BookStack\Page::getExcerpt PHP Method

getExcerpt() public method

Get an excerpt of this page's content to the specified length.
public getExcerpt ( integer $length = 100 ) : mixed
$length integer
return mixed
    public function getExcerpt($length = 100)
    {
        $text = strlen($this->text) > $length ? substr($this->text, 0, $length - 3) . '...' : $this->text;
        return mb_convert_encoding($text, 'UTF-8');
    }