def pad(string: str, length: int) -> str:
    """ pads string with spaces at end so that it will use length characters """
    diff = length - len(string)
    if diff > 0:
        return string + ' ' * diff
    else:
        return string