```python
def shed_tail(text: str, piece: str) -> str:
    while text.endswith(piece):
        text = text[:-len(piece)]
    return text
```