BookStack\Chapter::getExcerpt PHP Метод

getExcerpt() публичный Метод

Get an excerpt of this chapter's description to the specified length or less.
public getExcerpt ( integer $length = 100 ) : string
$length integer
Результат string
    public function getExcerpt($length = 100)
    {
        $description = $this->description;
        return strlen($description) > $length ? substr($description, 0, $length - 3) . '...' : $description;
    }