Habari\MultiByte::strrpos PHP Метод

strrpos() публичный статический Метод

Find position of last occurrence of string in a string.
public static strrpos ( $haysack, $needle, $offset, $use_enc = null ) : mixed
$haysack string. The string being checked.
$offset integer. The search offset. If it is not specified, 0 is used.
$use_enc string. The encoding to be used. If not set, the internal encoding will be used.
Результат mixed The section of the source string requested in the encoding requested or false. If $len is not set, returns substring from $begin to end of string.
    public static function strrpos($haysack, $needle, $offset = 0, $use_enc = null)
    {
        $enc = self::$hab_enc;
        if ($use_enc !== null) {
            $enc = $use_enc;
        }
        if (self::$use_library == self::USE_MBSTRING) {
            $ret = mb_strrpos($haysack, $needle, $offset, $enc);
        } else {
            $ret = strrpos($haysack, $needle, $offset);
        }
        return $ret;
    }