| 653 | |
| 654 | |
| 655 | void printRowInTwoQuadrants( |
| 656 | vector<string> leftRow, vector<size_t> leftColWidths, |
| 657 | vector<string> rightRow, vector<size_t> rightColWidths |
| 658 | ) { |
| 659 | // print left portion of row |
| 660 | for (size_t c=0; c<leftRow.size(); c++) |
| 661 | cout << left << setw(leftColWidths[c] + MIN_SPACE_BETWEEN_DENSE_MATRIX_COLS) << setfill(MATRIX_SPACE_CHAR) |
| 662 | << leftRow[c]; |
| 663 | |
| 664 | // finish without printing trailing newline if there is no right portion |
| 665 | if (rightRow.empty()) |
| 666 | return; |
| 667 | |
| 668 | // draw ellipsis; left-spacer already applied by previous amp |
| 669 | string spacer = string(MIN_SPACE_BETWEEN_DENSE_MATRIX_COLS, MATRIX_SPACE_CHAR); |
| 670 | cout << HDOTS_CHAR << spacer; |
| 671 | |
| 672 | // print right portion |
| 673 | for (size_t c=0; c<rightRow.size(); c++) |
| 674 | cout << left << setw(rightColWidths[c] + MIN_SPACE_BETWEEN_DENSE_MATRIX_COLS) << setfill(MATRIX_SPACE_CHAR) |
| 675 | << rightRow[c]; |
| 676 | |
| 677 | // do not print a trailing new line; caller may wish to append more characters |
| 678 | } |
| 679 | |
| 680 | |
| 681 | void printContiguousRowsInTwoQuadrants( |
no outgoing calls
no test coverage detected