C语言 用C解析CSV文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14115529/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Parse CSV file in C
提问by nik
Is there a library I can use to parse CSV files in C. I am on a Linux system. I know about thisbut 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 中的 CSV 文件。我在 Linux 系统上。我知道这一点,但它是用 C++ 编写的,我需要用 C 编写的东西。如果有人已经完成了,我不想经历调试和测试的痛苦。
采纳答案by Garett
回答by Jonathan Leffler
There's a simple CSV parser library that's described in the excellent book The Practice of Programmingby Kernighan and Pike, and the source is available from the site linked to.
这里是一个的在出色的书描述了一个简单的CSV解析库编程实践由 Kernighan和派克,源可以从链接到该网站。

