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

Method shape

include/tabulate/table_internal.hpp:87–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 size_t size() const { return rows_.size(); }
86
87 std::pair<size_t, size_t> shape() {
88 std::pair<size_t, size_t> result{0, 0};
89 std::stringstream stream;
90 print(stream);
91 auto buffer = stream.str();
92 auto lines = Format::split_lines(buffer, "\n", "", true);
93 if (lines.size()) {
94 result = {get_sequence_length(lines[0], "", true), lines.size()};
95 }
96 return result;
97 }
98
99 Format &format() { return format_; }
100

Callers

nothing calls this directly

Calls 3

get_sequence_lengthFunction · 0.70
strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected