public function eatBackUntil($string)
{
$position = $this->position;
$stringLength = strlen($string);
do {
$position -= $stringLength;
$currentString = substr($this->script, $position - $stringLength, $stringLength);
} while ($currentString !== $string && $position >= 0);
$length = $this->position - $position;
if ($position) {
$this->script = substr($this->script, 0, $position) . substr($this->script, $this->position);
$this->length -= $this->position - $position;
$this->position -= $this->position - $position;
}
return $length;
}