MCPcopy Create free account
hub / github.com/d99kris/rapidcsv / RemoveRow

Method RemoveRow

src/rapidcsv.h:1071–1086  ·  view source on GitHub ↗

* @brief Remove row by index. * @param pRowIdx zero-based row index. */

Source from the content-addressed store, hash-verified

1069 * @param pRowIdx zero-based row index.
1070 */
1071 void RemoveRow(const size_t pRowIdx)
1072 {
1073 const size_t dataRowIdx = GetDataRowIndex(pRowIdx);
1074 if (dataRowIdx < mData.size())
1075 {
1076 mData.erase(mData.begin() + static_cast<std::ptrdiff_t>(dataRowIdx));
1077 }
1078 else
1079 {
1080 const std::string errStr = "row out of range: " +
1081 std::to_string(pRowIdx);
1082 throw std::out_of_range(errStr);
1083 }
1084
1085 UpdateRowNames();
1086 }
1087
1088 /**
1089 * @brief Remove row by name.

Callers 4

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 4

mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64