Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def multiheader(lhs="", rhs="", width=80, nonewline=False):
- if not lhs and not rhs:
- return f"|b{'-' * width}|n"
- else:
- #actual = width - (len(strip_ansi(lhs)) + len(strip_ansi(rhs)) + 10)
- actual = width - (len(strip_ansi(lhs)) + len(strip_ansi(rhs)) + 22)
- if actual < 0:
- actual = 0
- nl = '\n' if not nonewline else ''
- #return f"|b--[|n |C{lhs}|n |b]{'-' * actual}[|n |w{rhs}|n |b]--|n{nl}"
- return f"|b--- |b<< |c{lhs} |b>> |b{'-' * actual} |b<< |c{rhs} |b>> |b---|n{nl}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement