API17

Difference between revisions of "JString::substr"

From Joomla! Documentation

(Layout updates)
(Updated to r1448:247ba8d88526)
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JString::substr|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JString::substr|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JString::substr ($str, $offset, $length=FALSE)
+
public static function substr (
 +
        $str
 +
        $offset
 +
        $length=FALSE
 +
)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 32: Line 35:
 
|integer
 
|integer
 
|FALSE
 
|FALSE
|(optional) length in UTF-8 characters from offset  
+
|(optional) length in UTF-8 characters from offset
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns''' mixed string or FALSE if failure
mixed string or FALSE if failure
+
* '''Defined''' on line 95 of libraries/joomla/utilities/string.php
===Defined in===
+
* '''Referenced by'''
libraries/joomla/utilities/string.php (line 99)
+
** [[JHtmlString::abridge/11.1|JHtmlString::abridge]]
* see source code in [[jplatform:utilities/string.php#cl-99|BitBucket]]
+
** [[JHtmlList::genericordering/11.1|JHtmlList::genericordering]]
===Referenced by===
+
** [[JHtmlString::truncate/11.1|JHtmlString::truncate]]
* [[JHtmlString::abridge/11.1|JHtmlString::abridge]]
 
* [[JHtmlList::genericordering/11.1|JHtmlList::genericordering]]
 
* [[JHtmlString::truncate/11.1|JHtmlString::truncate]]
 
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JString::substr source code''' on [[jplatform:utilities/string.php#cl-87|BitBucket]]
 +
* {{JVer|11.1}} Class [[JString/11.1|JString]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_Utilities/11.1|Utilities]]
 +
* [[JString::substr|Other versions of JString::substr]]
 +
{{SeeAlso:JString::substr}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JString::substr|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JString::substr|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JString/11.1|JString]]
+
===User contributed notes===
* [[JString::substr|Other versions of this method]]
 
{{SeeAlso:JString::substr}}
 
===Examples===
 
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 59: Line 61:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JString]][[Category:JString::substr]]</noinclude>
 
<noinclude>[[Category:JString]][[Category:JString::substr]]</noinclude>

Revision as of 21:44, 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 JString::substr[edit]

Description[edit]

UTF-8 aware alternative to substr Return part of a string given character offset (and optionally length).

Template:Description:JString::substr [Edit Descripton]

public static function substr (
        $str
        $offset
        $length=FALSE
)
Parameter Type Default Description
$str string
$offset integer number of UTF-8 characters offset (from left)
$length integer FALSE (optional) length in UTF-8 characters from offset

See also[edit]

Template:SeeAlso:JString::substr [Edit See Also]

User contributed notes[edit]

<CodeExamplesForm />