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

Method GetColumnCount

src/rapidcsv.h:908–914  ·  view source on GitHub ↗

* @brief Get number of data columns (excluding label columns). * @returns column count. */

Source from the content-addressed store, hash-verified

906 * @returns column count.
907 */
908 size_t GetColumnCount() const
909 {
910 const size_t firstRow = static_cast<size_t>((mLabelParams.mColumnNameIdx >= 0) ? mLabelParams.mColumnNameIdx : 0);
911 const int count = static_cast<int>((mData.size() > firstRow) ? mData.at(firstRow).size() : 0) -
912 (mLabelParams.mRowNameIdx + 1);
913 return (count >= 0) ? static_cast<size_t>(count) : 0;
914 }
915
916 /**
917 * @brief Get row index by name.

Callers 2

test042.cppFile · 0.80
test065.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected