JHtmlString::abridge
Abridges text strings over the specified character limit. The behavior will insert an ellipsis into the text replacing a section of variable size to ensure the string does not exceed the defined maximum length. This method is UTF-8 safe.
For example, it transforms "Really long title" to "Really...title". Note that this method does not scan for HTML tags so will potentially break them.
Signature
public function abridge(string
$text,
[integer
$length = 50,
[integer
$intro = 30]] )
Parameters
-
$text
- The text to abridge.
-
$length
- The maximum length of the text (default is 50).
-
$intro
- The maximum length of the intro text (default is 30).
Returns
- string
- The abridged text.