mcpp index

compat.rapidcsv

#include

Fast CSV parser — single-header document/column/cell access (header-only)

#include <rapidcsv.h>
mcpp add compat.rapidcsv@9.07

Usage

From this repository's own test project — built and run by CI, not written for the website.

// compat.rapidcsv — exercise the parser's document model: a header row, typed
// cell access by column name and by index, a whole column, and CSV's
// quoted-field semantics (a separator inside quotes is data, not a delimiter).
//
// Everything is parsed from memory: no input file, no network.
#include <rapidcsv.h>

#include <sstream>
#include <string>
#include <vector>

int main() {
    std::istringstream csv(
        "city,population\n"
        "tokyo,13960000\n"
        "osaka,2691000\n");

    rapidcsv::Document doc(csv, rapidcsv::LabelParams(0, -1));

    bool ok = doc.GetColumnCount() == 2 && doc.GetRowCount() == 2;

    ok = ok && doc.GetColumnName(0) == "city";
// …

tests/examples/rapidcsv/tests/document.cpp · project tests/examples/rapidcsv

Build

targets
rapidcsv (lib)
language
c++23
C standard
c11
import std
no
include dirs
*/src

Sources (1)

  • mcpp_generated/rapidcsv_anchor.c

Generated files

  • mcpp_generated/rapidcsv_anchor.c

Versions

VersionPlatforms Mirrorssha256
9.07 latest LinuxWindowsmacOS source 442c1d600801…