compat.rapidcsv
#includeFast CSV parser — single-header document/column/cell access (header-only)
#include <rapidcsv.h>
mcpp add compat.rapidcsv@9.07
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// 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 · 项目 tests/examples/rapidcsv
构建
- targets
rapidcsv (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/src
源文件 (1)
mcpp_generated/rapidcsv_anchor.c
生成的文件
mcpp_generated/rapidcsv_anchor.c
版本
| 版本 | 平台 | 镜像 | sha256 |
|---|---|---|---|
9.07 最新 |
LinuxWindowsmacOS | 源站 | 442c1d600801… |