API16

JString/strrpos: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 4: Line 4:




{{subst:Description:JString/strrpos}}
 


===Syntax===
===Syntax===
Line 45: Line 45:




{{subst:SeeAlso:JString/strrpos}}
 


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=strrpos
  category=strrpos
  category=JString
  category=JString
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 02:08, 25 March 2017

Description

UTF-8 aware alternative to strrpos Finds position of last occurrence of a string



Syntax

static strrpos($str, $search, $offset=false)
Parameter Name Default Value Description
$str - string String being examined
$search - string String being searced for
$offset false

Returns

mixed Number of characters before the last match or FALSE on failure

Defined in

libraries/joomla/utilities/string.php

Importing

jimport( 'joomla.utilities.string' );

Source Body

public static function strrpos($str, $search, $offset = false)
{
        return utf8_strrpos($str, $search);
}



Examples

Code Examples