| 43 | } |
| 44 | |
| 45 | Status MismatchingColumns(const InvalidRow& row) { |
| 46 | std::string ellipse; |
| 47 | auto row_string = row.text; |
| 48 | if (row_string.length() > 100) { |
| 49 | row_string = row_string.substr(0, 96); |
| 50 | ellipse = " ..."; |
| 51 | } |
| 52 | if (row.number < 0) { |
| 53 | return ParseError("Expected ", row.expected_columns, " columns, got ", |
| 54 | row.actual_columns, ": ", row_string, ellipse); |
| 55 | } |
| 56 | return ParseError("Row #", row.number, ": Expected ", row.expected_columns, |
| 57 | " columns, got ", row.actual_columns, ": ", row_string, ellipse); |
| 58 | } |
| 59 | |
| 60 | inline bool IsControlChar(uint8_t c) { return c < ' '; } |
| 61 |
no test coverage detected