terminaltables

Types

Cell = object
  leftpad*: int
  rightpad: int
  pad*: int
  text*: string
TerminalTable = object
  rows: seq[seq[string]]
  headers: seq[ref Cell]
  style: Style
  widths: seq[int]
  suggestedWidths: seq[int]
  tableWidth*: int
  separateRows*: bool

Procs

proc newCell(text: string; leftpad = 1; rightpad = 1; pad = 0): ref Cell {...}{.raises: [], tags: [].}
proc len(this: ref Cell): int {...}{.raises: [], tags: [].}
proc `$`(this: ref Cell): string {...}{.raises: [], tags: [].}
proc newTerminalTable(style: Style = asciiStyle): ref TerminalTable {...}{.raises: [],
    tags: [].}
proc newAsciiTable(style: Style = asciiStyle): ref TerminalTable {...}{.raises: [], tags: [].}
proc newUnicodeTable(style: Style = unicodeStyle): ref TerminalTable {...}{.raises: [],
    tags: [].}
proc columnsCount(this: ref TerminalTable): int {...}{.raises: [], tags: [].}
proc setHeaders(this: ref TerminalTable; headers: seq[string]) {...}{.raises: [], tags: [].}
proc setHeaders(this: ref TerminalTable; headers: seq[ref Cell]) {...}{.raises: [], tags: [].}
proc setRows(this: ref TerminalTable; rows: seq[seq[string]]) {...}{.raises: [], tags: [].}
proc addRows(this: ref TerminalTable; rows: seq[seq[string]]) {...}{.raises: [], tags: [].}
proc addRow(this: ref TerminalTable; row: seq[string]) {...}{.raises: [], tags: [].}
proc suggestWidths(this: ref TerminalTable; widths: seq[int]) {...}{.raises: [], tags: [].}
proc reset(this: ref TerminalTable) {...}{.raises: [], tags: [].}
proc render(this: ref TerminalTable): string {...}{.raises: [ValueError], tags: [].}
proc printTable(this: ref TerminalTable) {...}{.raises: [ValueError], tags: [].}