Function Reference: geodir_utf8_strrpos

Summary

Find position of last occurrence of a string in a string.

Package

Geodirectory

Parameters

$str
(string) (required) The string being checked, for the last occurrence of search.

Default: None
$find
(string) (required) The string to find in input string.

Default: None
$offset
(int) (required) Specifies begin searching an arbitrary number of characters into the string.

Default: None
$encoding
(string) (required) The encoding parameter is the character encoding.

Default: “UTF-8”

Return Values

(int)
  • Returns the position of the last occurrence of search.

Change Log

Since: 1.6.18

Source File

geodir_utf8_strrpos() is located in geodirectory-functions/helper_functions.php [Line: 1154]

Source Code

function geodir_utf8_strrpos( $str, $find, $offset = 0, $encoding = 'UTF-8' ) {
    if ( function_exists( 'mb_strrpos' ) ) {
        return mb_strrpos( $str, $find, $offset, $encoding );
    }
        
    return strrpos( $str, $find, $offset );
}