def ellipsis(s: str, width: int) -> str:
    """
    Shrinks the given string to width (including an ellipsis character).

    Parameters
    ----------
    s
        The string.
    width
        The maximum width.

    Returns
    -------
    str
        A modified string with at most `width` characters.
    """
    if len(s) > width:
        s = s[:width - 1] + "…"
    return s