src/Structures/Buffer.php
public function search($string, $reverse = false)
    {
        if ($reverse) {
            return strrpos($this->data, $string);
        }
        
        return strpos($this->data, $string);
    }
public function search($string, $reverse = false)
    {
        if ($reverse) {
            return strrpos($this->data, $string);
        }
        
        return strpos($this->data, $string);
    }
Returns the position of the given pattern in the buffer if it exists, or false if it does not.

@param string $string String to search for.
@param bool $reverse Start search from end of buffer.

@return int|bool

@see strpos()