Class JHtmlString
HTML helper class for rendering manipulated strings.
Abstract
Package: Joomla\Libraries\HTML
Copyright: Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
License: General Public License version 2 or later; see LICENSE.txt
Since: 1.6
Located at cms/html/string.php
Package: Joomla\Libraries\HTML
Copyright: Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
License: General Public License version 2 or later; see LICENSE.txt
Since: 1.6
Located at cms/html/string.php
Methods summary
public static
string
|
#
truncate( string $text, integer $length = 0, boolean $noSplit = true, boolean $allowHtml = true )
Truncates text blocks over the specified character limit and closes all open HTML tags. The method will optionally not truncate an individual word, it will find the first space that is within the limit and truncate at that point. This method is UTF-8 safe. |
public static
string
|
#
truncateComplex( string $html, integer $maxLength = 0, boolean $noSplit = true )
Method to extend the truncate method to more complex situations |
public static
string
|
#
abridge( string $text, integer $length = 50, integer $intro = 30 )
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. |