API17:JString::strpos
From Joomla! Documentation
(Difference between revisions)
(Layout updates) |
(Updated to r1448:247ba8d88526) |
||
| Line 8: | Line 8: | ||
<nowiki>[</nowiki>[[Description:JString::strpos|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JString::strpos|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
<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 35: | ||
|$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 [[JString/11.1|JString]] | ||
| + | * {{JVer|11.1}} Subpackage [[Subpackage_Utilities/11.1|Utilities]] | ||
| + | * [[JString::strpos|Other versions of JString::strpos]] | ||
| + | {{SeeAlso:JString::strpos}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JString::strpos|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JString::strpos|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | + | ===User contributed notes=== | |
| − | + | ||
| − | + | ||
| − | === | + | |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 56: | Line 57: | ||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:JString]][[Category:JString::strpos]]</noinclude> | <noinclude>[[Category:JString]][[Category:JString::strpos]]</noinclude> | ||
Revision as of 21:44, 27 April 2011
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.
JString::strpos
Description
UTF-8 aware alternative to strpos Find position of first occurrence of a string.
Description:JString::strpos [Edit Descripton]
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
-
JString::strpos source code on BitBucket
-
Class JString
-
Subpackage Utilities
- Other versions of JString::strpos
SeeAlso:JString::strpos [Edit See Also]
User contributed notes
<CodeExamplesForm />
