# std/private/asciitables

Theme:

- Manual
- Standard library
- Index
- Compiler docs
- Fusion docs
- devel, stable

Search:
Source Edit

# 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: [], forbids: [].}

  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: [],
        forbids: [].}

  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