API17

Difference between revisions of "JHtmlString::truncate"

From Joomla! Documentation

(Layout updates)
(Updated to r1448:247ba8d88526)
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JHtmlString::truncate|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JHtmlString::truncate|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JHtmlString::truncate ($text, $length=0)
+
public static function truncate (
 +
        $text
 +
        $length=0
 +
)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 30: Line 32:
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns'''
 
+
* '''Defined''' on line 33 of libraries/joomla/html/html/string.php
===Defined in===
 
libraries/joomla/html/html/string.php (line 33)
 
* see source code in [[jplatform:html/html/string.php#cl-33|BitBucket]]
 
===Referenced by===
 
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JHtmlString::truncate source code''' on [[jplatform:html/html/string.php#cl-25|BitBucket]]
 +
* {{JVer|11.1}} Class [[JHtmlString/11.1|JHtmlString]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_Html/11.1|Html]]
 +
* [[JHtmlString::truncate|Other versions of JHtmlString::truncate]]
 +
{{SeeAlso:JHtmlString::truncate}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JHtmlString::truncate|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JHtmlString::truncate|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JHtmlString/11.1|JHtmlString]]
+
===User contributed notes===
* [[JHtmlString::truncate|Other versions of this method]]
 
{{SeeAlso:JHtmlString::truncate}}
 
===Examples===
 
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 51: Line 51:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JHtmlString]][[Category:JHtmlString::truncate]]</noinclude>
 
<noinclude>[[Category:JHtmlString]][[Category:JHtmlString::truncate]]</noinclude>

Revision as of 21:09, 27 April 2011

The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Joomla 11.1 JHtmlString::truncate[edit]

Description[edit]

Truncates text blocks over the specified character limit and closes all open HTML tags.

Template:Description:JHtmlString::truncate [Edit Descripton]

public static function truncate (
        $text
        $length=0
)
Parameter Type Default Description
$text
$length 0
  • Returns
  • Defined on line 33 of libraries/joomla/html/html/string.php

See also[edit]

Template:SeeAlso:JHtmlString::truncate [Edit See Also]

User contributed notes[edit]

<CodeExamplesForm />