public function indexOf($string, int $offset = 0): int
    {
        Assert::typeOf(['string', __CLASS__], $string);
        $pos = mb_strpos($this->data, (string) $string, $offset, $this->encoding);

        return $pos > -1 ? $pos : -1;
    }
public function indexOf($string, int $offset = 0): int
    {
        Assert::typeOf(['string', __CLASS__], $string);
        $pos = mb_strpos($this->data, (string) $string, $offset, $this->encoding);

        return $pos > -1 ? $pos : -1;
    }
public function indexOf ( $ string , int $ offset = 0 ) : int { Assert :: typeOf ( [ 'string' , __CLASS__ ] , $ string ) ; $ pos = mb_strpos ( $ this -> data , ( string ) $ string , $ offset , $ this -> encoding ) ; return $ pos > - 1 ? $ pos : - 1 ; }
Returns the index within this string of the first occurrence of the specified string

@param static|string $string
@param int           $offset
@return int
@throws InvalidArgumentException
@throws TypeError
Returns the index within this string of the first occurrence of the specified string