Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Anas-Hamdane/tabular

Repository files navigation

tabular

A lightweight, header-only C++ library for creating well-formatted, fully-customizable CLI tables.

Features

  • full Unicode support
  • locale-independent display width handling
  • cross-platform rendering support trough render() function
  • compatible with fmtlib's colored strings
  • fully customizable through Alignment, Padding, Color, Rgb...
  • flexible tables with variant number of columns are supported
  • full c++11 support, uses only vector, string, stdexcept and cstdint standard headers
  • fully customizable border with pre-defined ready-to use templates
  • header-only lightweight library with a single-include file

Quick Start

Include the header files or the single-header file and start the journey!

#include "tabular/table.h"
#include "tabular/render.h"

int main()
{
  using namespace tabular;
  Table table;

  table.addRow({"Countries Capitals"})
      .addRow({"United States", "Washington"})
      .addRow({"Brazil", "Brasilia"})
      .addRow({"France", "Paris"})
      .addRow({"Japan", "Tokyo"})
      .addRow({"India", "New Delhi"});

  render(table.str() + '\n', stdout);
  return 0;
}

Documentation

For complete documentation with examples:

About

lightweight, header-only C++ library for creating well-formatted, fully-customizable CLI tables.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •