def alignStr(x, size, pad=' ', padzero=True):
    """Pad length of `x` to multiple of `size`"""
    if len(x) == 0:
        return pad * size if padzero else x
    x = pad * (-len(x) % size) + x
    return x
