Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/briandowns/libdotenv

libdotenv is a C single-headerlibrary providing the ability to load values from a .env file into environment variables.
https://github.com/briandowns/libdotenv

c c-programming-language c17 dotenv dotenv-loader dotenv-parser

Last synced: about 8 hours ago
JSON representation

libdotenv is a C single-headerlibrary providing the ability to load values from a .env file into environment variables.

Awesome Lists containing this project

README

        

# libdotenv

[![Build Status](https://travis-ci.com/briandowns/libdotenv.svg?branch=master)](https://travis-ci.com/briandowns/libdotenv)

libdotenv is a C library providing the ability to load values from a `.env` file into environment variables.

An example can be found in the `examples` directory.

## Features

* Ignores lines starting with whitespace
* Ignores lines starting with whitespace `#`
* Empty values become empty strings
* Whitespace is removed from start and end of unquoted strings
* Single quoted strings are replaced to double quoted
* Quoted values maintain their whitespace

## Contributing

Please feel free to open a PR!

## License

libdotenv source code is available under the BSD 2 clause [License](/LICENSE).

## Contact

[@bdowns328](http://twitter.com/bdowns328)