protected function findVariable(int $i, bool $escape): int
    {
        $close = ($escape === true ? '}}}' : '}}');

        for (; mb_substr($this->source, $i, mb_strlen($close)) !== $close; $i++) {
        }

        return $i + mb_strlen($close);
    }
protected function findVariable(int $i, bool $escape): int
    {
        $close = ($escape === true ? '}}}' : '}}');

        for (; mb_substr($this->source, $i, mb_strlen($close)) !== $close; $i++) {
        }

        return $i + mb_strlen($close);
    }
protected function findVariable ( int $ i , bool $ escape ) : int { $ close = ( $ escape === true ? '}}}' : '}}' ) ; for ( ; mb_substr ( $ this -> source , $ i , mb_strlen ( $ close ) ) !== $ close ; $ i ++ ) { } return $ i + mb_strlen ( $ close ) ; }
Since we know where the start is,
we need to find the end in the source.

@param int $i
@param bool $escape
@return int
Since we know where the start is we need to find the end in the source .