asciitables

    Dark Mode
Search:
Group by:

Types

Cell = object
  text*: string
  width*, row*, col*, ncols*, nrows*: int
  Source Edit

Procs

proc alignTable(s: string; delim = '\t'; fill = ' '; sep = " "): string {...}{.
    raises: [], tags: [].}
formats a delim-delimited s representing a table; each cell is aligned to a width that's computed for each column; consecutive columns are delimited by sep, and alignment space is filled using fill. More customized formatting can be done by calling parseTableCells directly.   Source Edit

Iterators

iterator parseTableCells(s: string; delim = '\t'): Cell {...}{.raises: [], tags: [].}
iterates over all cells in a delim-delimited s, after a 1st pass that computes number of rows, columns, and width of each column.   Source Edit