MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / setColumn

Method setColumn

src/csvdatastorage.cpp:495–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493
494
495std::string CsvDataStorage::setColumn(std::string rowString, table_index_t column, std::string content) {
496 std::vector<std::string> row = splitString(rowString);
497 if( (table_index_t) row.size() < numColumns ) {
498 row.resize(numColumns, "");
499 }
500 if( (table_index_t) row.size() > column && column >= 0 ) {
501 row[column] = content;
502 return mergeString(row);
503 } else {
504 return rowString;
505 }
506}
507
508
509/**

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected