MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / operator*

Method operator*

Bcore/src/main/cpp/Dobby/tests/catch.hpp:5288–5305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5286 return m_iterators != other.m_iterators;
5287 }
5288 auto operator*() const -> std::string {
5289 std::string row, padding;
5290
5291 for (size_t i = 0; i < m_columns.size(); ++i) {
5292 auto width = m_columns[i].width();
5293 if (m_iterators[i] != m_columns[i].end()) {
5294 std::string col = *m_iterators[i];
5295 row += padding + col;
5296 if (col.size() < width)
5297 padding = std::string(width - col.size(), ' ');
5298 else
5299 padding = "";
5300 } else {
5301 padding += std::string(width, ' ');
5302 }
5303 }
5304 return row;
5305 }
5306 auto operator++() -> iterator & {
5307 for (size_t i = 0; i < m_columns.size(); ++i) {
5308 if (m_iterators[i] != m_columns[i].end())

Callers

nothing calls this directly

Calls 3

widthMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected