Difference between revisions of "JString::strpos"
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 strpos Find position of first occurrence of a string. | UTF-8 aware alternative to strpos Find position of first occurrence of a string. | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
− | public static | + | public static function strpos ( |
+ | $str | ||
+ | $search | ||
+ | $offset=FALSE | ||
+ | ) | ||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 32: | Line 33: | ||
|$offset | |$offset | ||
|FALSE | |FALSE | ||
− | |- int Optional, specifies the position from which the search should be performed | + | |- int Optional, specifies the position from which the search should be performed |
|- | |- | ||
|} | |} | ||
− | + | * '''Returns''' mixed Number of characters before the first match or FALSE on failure | |
− | mixed Number of characters before the first match or FALSE on failure | + | * '''Defined''' on line 61 of libraries/joomla/utilities/string.php |
− | |||
− | libraries/joomla/utilities/string.php | ||
− | |||
− | |||
===See also=== | ===See also=== | ||
− | + | * {{JVer|11.1}} '''JString::strpos source code''' on [[jplatform:utilities/string.php#cl-53|BitBucket]] | |
− | + | * {{JVer|11.1}} Class [[API17:JString|JString]] | |
− | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]] | |
− | * | + | * [[API17:JString::strpos|Other versions of JString::strpos]] |
− | * [[JString::strpos|Other versions of | + | |
− | + | ||
− | ===Examples=== | + | ===User contributed notes=== |
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JString::strpos | category=JString::strpos | ||
− | + | 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::strpos[edit]
Description[edit]
UTF-8 aware alternative to strpos Find position of first occurrence of a string.
public static function strpos (
$str
$search
$offset=FALSE
)
Parameter | Type | Default | Description |
---|---|---|---|
$str | $str | ||
$search | $search | ||
$offset | $offset | FALSE |
- Returns mixed Number of characters before the first match or FALSE on failure
- Defined on line 61 of libraries/joomla/utilities/string.php
See also[edit]
- JString::strpos source code on BitBucket
- Class JString
- Subpackage Utilities
- Other versions of JString::strpos
User contributed notes[edit]
Code Examples[edit]