def ljust(s: str, width: int, fillchar=' ') ->str:
    """
    Like str.ljust, but makes sure that the output is always the given width,
    even if s is longer than `width`
    """
    s = s if isinstance(s, str) else str(s)
    s = s.ljust(width, fillchar)
    if len(s) > width:
        s = s[:width]
    return s
