Function Reference: geodir_utf8_strpos

Summary

Find position of first occurrence of string in a string

Package

Geodirectory

Parameters

$str
(string) (required) The string being checked.

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

Default: None
$offset
(int) (required) The search offset. A negative offset counts from the end of the string.

Default: “0”
$encoding
(string) (required) The encoding parameter is the character encoding.

Default: “UTF-8”

Return Values

(int)
  • Returns the position of the first occurrence of search in the string.

Change Log

Since: 1.6.18

Source File

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

Source Code

function geodir_utf8_strpos( $str, $find, $offset = 0, $encoding = 'UTF-8' ) {
    if ( function_exists( 'mb_strpos' ) ) {
        return mb_strpos( $str, $find, $offset, $encoding );
    }
        
    return strpos( $str, $find, $offset );
}