protected function find($string) {
        $position = strpos($this->code, $string, $this->currentPosition);
        if ($position === false) {
            $position = $this->codeLength;
        }
        return $position;
    }