dropshell/src/tableprint.hpp
2025-04-21 20:47:03 +12:00

23 lines
558 B
C++

# ifndef TABLEPRINT_HPP
# define TABLEPRINT_HPP
#include <vector>
#include <string>
#include <iostream>
// tableprint is a class that prints a table of strings.
// formatted to look nice with colored headings and rows.
// converts :tick: to a green tick and :cross: to a red cross.
// assumes the first row is the header.
class tableprint {
public:
tableprint();
~tableprint();
void add_row(const std::vector<std::string>& row);
void print();
private:
std::vector<std::vector<std::string>> rows;
};
# endif