Categories
c linux

What c lib to use when I need to parse a simple config file under linux?

Let’s say I have a simple config file that my c program needs to read/parse.

Let’s say it looks a little bit like this:

#Some comment
key1=data1
key2=data2

Is there a standard c lib that I can use instead of writing my own parser?

Thanks
Johan


Note: Today I have my own little parser, but there must be some standard libs that solves this simple problem.

libconfig but it does quite more than what you’re asking