Formatting tables #
This module provides basic utilities for formatting tables with aligned columns. For now, we only supports tables of strings.
Future work #
- Specifying dividers and borders, padding characters, right/left alignment, column widths
- Ideally this is granular, e.g. per cell/row/column
- Composing and stacking tables
- Widget version using HTML tables to avoid awkward reflowing + allow
MessageData
@[inline]
Pad a string on the right with c : Char (by default ' '), until it reaches length n. Does
not trim strings already over length n down to length n.
Instances For
@[inline]
Pad a string on the left with c : Char (by default ' '), until it reaches length n. Does
not trim strings already over length n down to length n.
Instances For
Given an array of table rows, arranges them in a table. Each cell is left-aligned, and separated from the next cell in the row by a space. Spaces at the end of each row are trimmed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An empty row in a table.
Equations
Instances For
Increase the size of a row by padding it on the right with empty cells.
Equations
- row.rightPad h = ⋯ ▸ Vector.rightpad m "" row