Actions

API16

JString/str split

From Joomla! Documentation

< API16:JString
Revision as of 17:48, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Contents

Description

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

[Edit Descripton]

Description:JString/str split

Syntax

static str_split($str, $split_len=1)
Parameter Name Default Value Description
$str UTF-8 encoded
$split_len 1 number to characters to split string by

Returns

array

Defined in

libraries/joomla/utilities/string.php

Importing

jimport( 'joomla.utilities.string' );

Source Body

public static function str_split($str, $split_len = 1)
{
        jimport('phputf8.str_split');
        return utf8_str_split($str, $split_len);
}

[Edit See Also] SeeAlso:JString/str split

Examples

<CodeExamplesForm />