htils 1
A small set of utilities for C programming.
Loading...
Searching...
No Matches
dotenv.h File Reference
#include <htils/arena.h>
#include <htils/basictypes.h>
#include <htils/string.h>

Go to the source code of this file.

Functions

i32 htils_dotenv_load (arena_t *arena, const string *path)
 Load a dotenv file, or a path with a .env file within it.
 

Function Documentation

◆ htils_dotenv_load()

i32 htils_dotenv_load ( arena_t arena,
const string path 
)

Load a dotenv file, or a path with a .env file within it.

Parameters
pathThe path where a .env file is located or the explicit relative or complete path to the .env file
arenaThe arena to allocate from.
Precondition
  • path, and arena must be valid, and not null.
  • path must be a valid path.
Returns
amount of variables loaded, -1 on failure.