Method: str::excerpt
Creates an exceprt of a string
It removes all html tags first and then uses str::short
Info
Syntax
str::excerpt($string, $chars=140, $removehtml=true, $rep='…')
Parameters
- $string (string) The string to be shortened
- $chars (int) 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