Stringy\Stringy::indexOf PHP Method

indexOf() public method

Returns the index of the first occurrence of $needle in the string, and false if not found. Accepts an optional offset from which to begin the search.
public indexOf ( string $needle, integer $offset ) : integer | boolean
$needle string Substring to look for
$offset integer Offset from which to search
return integer | boolean The occurrence's index if found, otherwise false
    public function indexOf($needle, $offset = 0)
    {
        return \mb_strpos($this->str, (string) $needle, (int) $offset, $this->encoding);
    }