API17

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.  
  
{{Description:JString::strpos}}
+
 
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[Description:JString::strpos|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JString::strpos ($str, $search, $offset=FALSE)
+
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===
+
* '''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
===Defined in===
 
libraries/joomla/utilities/string.php (line 62)
 
* see source code in [[jplatform:utilities/string.php#cl-62|BitBucket]]
 
===Referenced by===
 
 
===See also===
 
===See also===
<span class="editsection" style="font-size:76%;">
+
* {{JVer|11.1}} '''JString::strpos source code''' on [[jplatform:utilities/string.php#cl-53|BitBucket]]
<nowiki>[</nowiki>[[SeeAlso:JString::strpos|Edit See Also]]<nowiki>]</nowiki>
+
* {{JVer|11.1}} Class [[API17:JString|JString]]
</span>
+
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]]
* [[JString/11.1|JString]]
+
* [[API17:JString::strpos|Other versions of JString::strpos]]
* [[JString::strpos|Other versions of this method]]
+
 
{{SeeAlso:JString::strpos}}
+
 
===Examples===
+
===User contributed notes===
<CodeExamplesForm />
+
=== Code Examples ===
 
<dpl>
 
<dpl>
 
noresultsheader=\n
 
noresultsheader=\n
 
category=JString::strpos
 
category=JString::strpos
category=CodeExample
+
namespace=CodeExample
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:JString]][[Category:JString::strpos]]</noinclude>
+
<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.

Joomla 11.1 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]


User contributed notes[edit]

Code Examples[edit]