Difference between revisions of "JString::strlen"
From Joomla! Documentation
(Bulk upload by Doxiki2) |
m (preparing for archive only) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
UTF-8 aware alternative to strlen Returns the number of characters in the string (NOT THE NUMBER OF BYTES),. | UTF-8 aware alternative to strlen Returns the number of characters in the string (NOT THE NUMBER OF BYTES),. | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
− | public static | + | public static function strlen ($str) |
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 22: | Line 19: | ||
|string | |string | ||
| | | | ||
− | |UTF-8 string | + | |UTF-8 string |
|- | |- | ||
|} | |} | ||
− | + | * '''Returns''' int number of UTF-8 characters in string | |
− | int number of UTF-8 characters in string | + | * '''Defined''' on line 146 of libraries/joomla/utilities/string.php |
− | + | * '''Referenced by''' | |
− | libraries/joomla/utilities/string.php | + | ** [[API17:JHtmlString::abridge|JHtmlString::abridge]] |
− | + | ** [[compliant|compliant]] | |
− | * [[JHtmlString | + | ** [[API17:JHtmlList::genericordering|JHtmlList::genericordering]] |
− | * [[compliant | + | ** [[API17:JHtmlString::truncate|JHtmlString::truncate]] |
− | * [[JHtmlList | + | ** [[valid|valid]] |
− | * [[JHtmlString | ||
− | * [[valid | ||
===See also=== | ===See also=== | ||
− | + | * {{JVer|11.1}} '''JString::strlen source code''' on [[jplatform:utilities/string.php#cl-138|BitBucket]] | |
− | + | * {{JVer|11.1}} Class [[API17:JString|JString]] | |
− | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]] | |
− | * | + | * [[API17:JString::strlen|Other versions of JString::strlen]] |
− | * [[JString::strlen|Other versions of | + | |
− | + | ||
− | ===Examples=== | + | ===User contributed notes=== |
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JString::strlen | category=JString::strlen | ||
− | + | 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::strlen[edit]
Description[edit]
UTF-8 aware alternative to strlen Returns the number of characters in the string (NOT THE NUMBER OF BYTES),.
public static function strlen ($str)
Parameter | Type | Default | Description |
---|---|---|---|
$str | string | UTF-8 string |
- Returns int number of UTF-8 characters in string
- Defined on line 146 of libraries/joomla/utilities/string.php
- Referenced by
See also[edit]
- JString::strlen source code on BitBucket
- Class JString
- Subpackage Utilities
- Other versions of JString::strlen
User contributed notes[edit]
Code Examples[edit]