30 std::optional<std::string>
getenv_str(
const char *env_var);
42 return val ? *val : default_val;
89 const char *env_var, std::string default_val, std::string desc) {
namespace for cli utilities
std::string getenv_str_default_register(const char *env_var, std::string default_val, std::string desc)
Get the content of the environment variable if it exist and register it documentation,...
std::optional< std::string > getenv_str(const char *env_var)
Get the content of the environment variable if it exist.
void print_help_env_var()
Print the documentation of the environment variables registered with register_env_var_doc()
std::optional< std::string > getenv_str_register(const char *env_var, std::string desc)
Get the content of the environment variable if it exist and register it documentation.
std::string getenv_str_default(const char *env_var, std::string default_val)
Get the content of the environment variable if it exist, otherwise return the default value.
void register_env_var_doc(std::string env_var, std::string desc)
Register the documentation of an environment variable.