Difference between revisions of "JHtmlString"

From Joomla! Documentation

(New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JHtmlString}} ===Defined in==...)
(fix importing. can't use standard jimport because class is JHtmlString, not JString)
Line 20: Line 20:
<source lang="php">jimport( 'joomla.html.html.string' );</source>
<source lang="php">JLoader::register('JHtmlString', JPATH_LIBRARIES.'/joomla/html/html/string.php');</source>
<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">

Latest revision as of 13:23, 16 February 2011

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

[Edit Descripton] Contains methods for working with strings of HTML text.

Defined in



Method name Description
truncate Truncates text blocks over the specified character limit. The behavior will 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.
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.


JLoader::register('JHtmlString', JPATH_LIBRARIES.'/joomla/html/html/string.php');

[Edit See Also] SeeAlso:JHtmlString


<CodeExamplesForm />