You are here

protected function simple_html_dom::copy_skip in simplehtmldom API 6

Same name and namespace in other branches
  1. 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom::copy_skip()
  2. 7 simplehtmldom/simple_html_dom.php \simple_html_dom::copy_skip()
2 calls to simple_html_dom::copy_skip()
simple_html_dom::parse_attr in simplehtmldom/simple_html_dom.php
simple_html_dom::read_tag in simplehtmldom/simple_html_dom.php

File

simplehtmldom/simple_html_dom.php, line 867

Class

simple_html_dom

Code

protected function copy_skip($chars) {
  $pos = $this->pos;
  $len = strspn($this->doc, $chars, $pos);
  $this->pos += $len;
  $this->char = $this->pos < $this->size ? $this->doc[$this->pos] : null;

  // next
  if ($len === 0) {
    return '';
  }
  return substr($this->doc, $pos, $len);
}