private function next()
    {
        if (!$this->valid()) {
            return;
        }

        ++$this->cursor;
        $this->current = $this->next;
        $this->next = isset($this->string[$this->cursor + 1]) ? $this->string[$this->cursor + 1] : null;
    }