MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / operator *

Method operator *

unittests/catch.hpp:5494–5512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5492 return m_iterators != other.m_iterators;
5493 }
5494 auto operator *() const -> std::string {
5495 std::string row, padding;
5496
5497 for( size_t i = 0; i < m_columns.size(); ++i ) {
5498 auto width = m_columns[i].width();
5499 if( m_iterators[i] != m_columns[i].end() ) {
5500 std::string col = *m_iterators[i];
5501 row += padding + col;
5502 if( col.size() < width )
5503 padding = std::string( width - col.size(), ' ' );
5504 else
5505 padding = "";
5506 }
5507 else {
5508 padding += std::string( width, ' ' );
5509 }
5510 }
5511 return row;
5512 }
5513 auto operator ++() -> iterator& {
5514 for( size_t i = 0; i < m_columns.size(); ++i ) {
5515 if (m_iterators[i] != m_columns[i].end())

Callers

nothing calls this directly

Calls 4

stringClass · 0.85
widthMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected