gtabler

A Gleam module for pretty-printing tables.

Types

A type representing the configuration of a table.

pub type TableConfig {
  TableConfig(
    separator: String,
    border_char: String,
    header_color: fn(String) -> String,
    cell_color: fn(String) -> String,
  )
}

Constructors

  • TableConfig(
      separator: String,
      border_char: String,
      header_color: fn(String) -> String,
      cell_color: fn(String) -> String,
    )

Functions

pub fn print_table(
  config c: TableConfig,
  headers h: List(String),
  rows r: List(List(String)),
) -> String

Print a table with the given configuration, headers, and rows.

Search Document