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

Function main

samples/border_styles.cpp:7–21  ·  view source on GitHub ↗

Demonstrates the fix for https://github.com/p-ranav/tabulate/issues/30: font_style can now be applied to borders and corners, not just cell text.

Source from the content-addressed store, hash-verified

5// Demonstrates the fix for https://github.com/p-ranav/tabulate/issues/30:
6// font_style can now be applied to borders and corners, not just cell text.
7int main() {
8 Table table;
9 table.add_row(Row_t{"Bold border", "Bold corners"});
10
11 table.format()
12 .border_style({FontStyle::bold})
13 .corner_style({FontStyle::bold})
14 .border_color(Color::cyan)
15 .corner_color(Color::cyan);
16
17 // A single side can still be styled independently.
18 table[0][0].format().border_top_style({FontStyle::bold, FontStyle::underline});
19
20 std::cout << table << std::endl;
21}

Callers

nothing calls this directly

Calls 2

add_rowMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected