src/Structures/BufferIterator.php
public function insert(string $data)
    {
        if (!$this->valid()) {
            throw new OutOfBoundsException('The iterator is not valid!');
        }
        
        $this->buffer[$this->current] = $data . $this->buffer[$this->current];
    }
public function insert(string $data)
    {
        if (!$this->valid()) {
            throw new OutOfBoundsException('The iterator is not valid!');
        }
        
        $this->buffer[$this->current] = $data . $this->buffer[$this->current];
    }
Inserts the given string into the buffer at the current iterator position.

@param string $data

@throws \Icicle\Stream\Exception\OutOfBoundsException If the iterator is invalid.