Parse CSV file in C [closed]

2019-01-07 20:03发布

Is there a library I can use to parse CSV files in C. I am on a Linux system. I know about this but it is in C++ and I need something in C. Don't want to go through the pain of debugging and testing if someone has already done it.

标签: c parsing csv
3条回答
仙女界的扛把子
2楼-- · 2019-01-07 20:29

Parsing a CSV is no too much complicated, depend of the CSV structure, take a look at the strtok function.

查看更多
仙女界的扛把子
3楼-- · 2019-01-07 20:35

Take a look at libcsv, which is a CSV library written in ANSI C89.

查看更多
不美不萌又怎样
4楼-- · 2019-01-07 20:44

There's a simple CSV parser library that's described in the excellent book The Practice of Programming by Kernighan and Pike, and the source is available from the site linked to.

查看更多
登录 后发表回答