finesse.utilities.tables.Table.expand_string¶
- Table.expand_string(text, width, align='right')[source]¶
Expand a string to have a certain length.
Add blank spaces to the string to get its visible length to width. align controls whether the spaces are added in front, at the end or both. text will be converted to str.
- Parameters:
- textstr
Can also be an objection with __str__ defined.
- widthint
- alignstr, optional
Must be one of “right”, “left” or “center”. Defaults to “right”.
- Raises:
- ValueError
If the string is shorter than the given length or align is not one of the given options.