Creates an exceprt of a string
It removes all html tags first and then uses str::short
static public excerpt ( string $string, integer $chars = 140, boolean $removehtml = true, string $rep = '…' ) : string | ||
$string | string | The string to be shortened |
$chars | integer | The final number of characters the string should have |
$removehtml | boolean | True: remove the HTML tags from the string first |
$rep | string | The element, which should be added if the string is too long. Ellipsis is the default. |
return | string | The shortened string |