API17

Difference between revisions of "JString::str split"

From Joomla! Documentation

(Layout updates)
m (preparing for archive only)
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
UTF-8 aware alternative to str_split Convert a string to an array.  
 
UTF-8 aware alternative to str_split Convert a string to an array.  
  
{{Description:JString::str_split}}
+
 
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[Description:JString::str_split|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JString::str_split ($str, $split_len=1)
+
public static function str_split (
 +
        $str
 +
        $split_len=1
 +
)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 27: Line 27:
 
|int
 
|int
 
|1
 
|1
|number to characters to split string by  
+
|number to characters to split string by
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns''' array
array
+
* '''Defined''' on line 181 of libraries/joomla/utilities/string.php
===Defined in===
 
libraries/joomla/utilities/string.php (line 188)
 
* see source code in [[jplatform:utilities/string.php#cl-188|BitBucket]]
 
===Referenced by===
 
 
===See also===
 
===See also===
<span class="editsection" style="font-size:76%;">
+
* {{JVer|11.1}} '''JString::str_split source code''' on [[jplatform:utilities/string.php#cl-173|BitBucket]]
<nowiki>[</nowiki>[[SeeAlso:JString::str_split|Edit See Also]]<nowiki>]</nowiki>
+
* {{JVer|11.1}} Class [[API17:JString|JString]]
</span>
+
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]]
* [[JString/11.1|JString]]
+
* [[API17:JString::str_split|Other versions of JString::str_split]]
* [[JString::str_split|Other versions of this method]]
+
 
{{SeeAlso:JString::str_split}}
+
 
===Examples===
+
===User contributed notes===
<CodeExamplesForm />
+
=== Code Examples ===
 
<dpl>
 
<dpl>
 
noresultsheader=\n
 
noresultsheader=\n
 
category=JString::str_split
 
category=JString::str_split
category=CodeExample
+
namespace=CodeExample
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:JString]][[Category:JString::str_split]]</noinclude>
+
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

Latest revision as of 22:45, 24 March 2017

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::str_split[edit]

Description[edit]

UTF-8 aware alternative to str_split Convert a string to an array.


public static function str_split (
        $str
        $split_len=1
)
Parameter Type Default Description
$str string UTF-8 encoded
$split_len int 1 number to characters to split string by
  • Returns array
  • Defined on line 181 of libraries/joomla/utilities/string.php

See also[edit]


User contributed notes[edit]

Code Examples[edit]