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: 8 months ago
JSON representation
libdotenv is a C single-headerlibrary providing the ability to load values from a .env file into environment variables.
- Host: GitHub
- URL: https://github.com/briandowns/libdotenv
- Owner: briandowns
- License: bsd-2-clause
- Created: 2021-04-03T06:09:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T14:32:38.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T03:23:10.585Z (12 months ago)
- Topics: c, c-programming-language, c17, dotenv, dotenv-loader, dotenv-parser
- Language: C
- Homepage:
- Size: 16.6 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libdotenv
[](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)