MCPcopy Create free account
hub / github.com/p-ranav/tabulate / main

Function main

samples/padding.cpp:5–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3using Row_t = Table::Row_t;
4
5int main() {
6 Table no_padding;
7 no_padding.format().font_style({FontStyle::bold}).padding(0);
8 no_padding.add_row(Row_t{"This cell has no padding"});
9 std::cout << "Table with no padding:\n" << no_padding << std::endl;
10
11 Table padding_top_bottom;
12 padding_top_bottom.format().font_style({FontStyle::bold}).padding(0);
13 padding_top_bottom.add_row(
14 Row_t{"This cell has padding top = 1", "This cell has padding bottom = 1"});
15 padding_top_bottom[0][0].format().padding_top(1);
16 padding_top_bottom[0][1].format().padding_bottom(1);
17
18 std::cout << "\nTable with top/bottom padding:\n" << padding_top_bottom << std::endl;
19}

Callers

nothing calls this directly

Calls 2

formatMethod · 0.45
add_rowMethod · 0.45

Tested by

no test coverage detected