simple_html_dom::copy_until_char PHP Method

copy_until_char() protected method

protected copy_until_char ( $char )
    protected function copy_until_char($char)
    {
        if ($this->char === null) {
            return '';
        }
        if (($pos = strpos($this->doc, $char, $this->pos)) === false) {
            $ret = substr($this->doc, $this->pos, $this->size - $this->pos);
            $this->char = null;
            $this->pos = $this->size;
            return $ret;
        }
        if ($pos === $this->pos) {
            return '';
        }
        $pos_old = $this->pos;
        $this->char = $this->doc[$pos];
        $this->pos = $pos;
        return substr($this->doc, $pos_old, $pos - $pos_old);
    }