sexy columns

v1
Brett 2023-12-03 17:01:51 -05:00
parent 34451b5b86
commit 743cb4ae91
2 changed files with 9 additions and 0 deletions

View File

@ -281,6 +281,11 @@ namespace blt::string
columns.push_back(column); columns.push_back(column);
} }
inline void addColumn(std::string column)
{
columns.emplace_back(std::move(column));
}
inline void addRow(TableRow row) inline void addRow(TableRow row)
{ {
if (row.rowValues.size() > columns.size()) if (row.rowValues.size() > columns.size())

View File

@ -71,5 +71,9 @@ void blt::test::utility::run()
->with(nullptr, new string::BinaryTreeFormatter::Node("Child1"))); ->with(nullptr, new string::BinaryTreeFormatter::Node("Child1")));
printLines(treeFormatter.construct()); printLines(treeFormatter.construct());
blt::string::TableFormatter tableQ2i1("Iteration 1");
tableQ2i1.addColumn({"Statement"});
tableQ2i1.addColumn({"Statement"});
} }