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. | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
− | public static | + | 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''' array | |
− | array | + | * '''Defined''' on line 181 of libraries/joomla/utilities/string.php |
− | |||
− | libraries/joomla/utilities/string.php | ||
− | |||
− | |||
===See also=== | ===See also=== | ||
− | + | * {{JVer|11.1}} '''JString::str_split source code''' on [[jplatform:utilities/string.php#cl-173|BitBucket]] | |
− | + | * {{JVer|11.1}} Class [[API17:JString|JString]] | |
− | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]] | |
− | * | + | * [[API17:JString::str_split|Other versions of JString::str_split]] |
− | * [[JString::str_split|Other versions of | + | |
− | + | ||
− | ===Examples=== | + | ===User contributed notes=== |
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JString::str_split | category=JString::str_split | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude>[[Category: | + | <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.
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]
- JString::str_split source code on BitBucket
- Class JString
- Subpackage Utilities
- Other versions of JString::str_split
User contributed notes[edit]
Code Examples[edit]