public function removeLast(string $tagName) : bool
    {
        $index = $this->findLastIndex($tagName);
        if ($index === -1) {
            return false;
        }

        $this->removeAt($index);
        return true;
    }