Habari\MultiByte::stripos PHP Method

stripos() public static method

Find position of first occurrence of string in a string. Case insensitive.
public static stripos ( $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.
return 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 stripos($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_stripos($haysack, $needle, $offset, $enc);
        } else {
            $ret = stripos($haysack, $needle, $offset);
        }
        return $ret;
    }