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

Function main

samples/indentation.cpp:8–15  ·  view source on GitHub ↗

Demonstrates the fix for https://github.com/p-ranav/tabulate/issues/96: Format::indent(n) prefixes every rendered line with n spaces, shifting the whole table to the right in the terminal.

Source from the content-addressed store, hash-verified

6// Format::indent(n) prefixes every rendered line with n spaces, shifting the
7// whole table to the right in the terminal.
8int main() {
9 Table table;
10 table.add_row(Row_t{"Command", "Description"});
11 table.add_row(Row_t{"git status", "List all new or modified files"});
12 table.format().indent(4);
13
14 std::cout << table << std::endl;
15}

Callers

nothing calls this directly

Calls 2

add_rowMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected