JString/strlen: Difference between revisions
From Joomla! Documentation
m removing red link to edit, no existant pages |
m preparing for archive only |
||
| Line 43: | Line 43: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=strlen | category=strlen | ||
category=JString | category=JString | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 01:09, 25 March 2017
Description
UTF-8 aware alternative to strlen Returns the number of characters in the string (NOT THE NUMBER OF BYTES),
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
strlen($str)
| Parameter Name | Default Value | Description |
|---|---|---|
| $str | UTF-8 string |
Returns
int number of UTF-8 characters in string
Defined in
libraries/joomla/utilities/string.php
Importing
jimport( 'joomla.utilities.string' );
Source Body
function strlen($str){
return utf8_strlen($str);
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples