JHtmlString::truncateComplex
Method to extend the truncate method to more complex situations
The goal is to get the proper length plain text string with as much of the html intact as possible with all tags properly closed.
Signature
public function truncateComplex(string
$html,
[integer
$maxLength = 0,
[boolean
$noSplit = true]] )
Parameters
-
$html
- The content of the introtext to be truncated
-
$maxLength
- The maximum number of characters to render
-
$noSplit
- Don't split a word if that is where the cutoff occurs (default: true).
Returns
- string
- The truncated string. If the string is truncated an ellipsis
(...) will be appended.
Tasks
Line | Task |
---|---|
192 | $character doesn't seem to be used... |