```python
def shed_tail(text: str, piece: str) -> str:
    if not piece:
        return text
    while text.endswith(piece):
