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

Method GetColumnNames

src/rapidcsv.h:1473–1486  ·  view source on GitHub ↗

* @brief Get column names * @returns vector of column names. */

Source from the content-addressed store, hash-verified

1471 * @returns vector of column names.
1472 */
1473 std::vector<std::string> GetColumnNames() const
1474 {
1475 if (mLabelParams.mColumnNameIdx >= 0)
1476 {
1477 const std::vector<std::string>& labelRow = mData.at(static_cast<size_t>(mLabelParams.mColumnNameIdx));
1478 const size_t offset = static_cast<size_t>(mLabelParams.mRowNameIdx + 1);
1479 if (offset <= labelRow.size())
1480 {
1481 return std::vector<std::string>(labelRow.begin() + static_cast<std::ptrdiff_t>(offset), labelRow.end());
1482 }
1483 }
1484
1485 return std::vector<std::string>();
1486 }
1487
1488 /**
1489 * @brief Get row name

Callers 2

mainFunction · 0.80
test051.cppFile · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64