```python
def strip_ends(text: str, mark: str) -> str:
    """The text with a character removed from both of its ends."""
    return text.strip(mark)
```