Crate nstd_env[−][src]
Functions
Returns a vector of strings that contain the cmd args that the program was started with.
Returns: NSTDVec args - The command line arguments.
Frees memory allocated by nstd_std_env_args.
Parameters:
NSTDVec *const args - Returned from nstd_std_env_args.
Returns: int errc - Nonzero on error.
Frees memory allocated by nstd_std_env_path_to_exe, nstd_std_env_current_dir or
nstd_std_env_temp_dir.
Parameters:
char **path - String from nstd_std_env_path_to_exe or nstd_std_env_current_dir.
Frees memory allocated by nstd_std_env_get_var.
Parameters:
char **v - The value returned from nstd_std_env_get_var.
Frees memory allocated by nstd_std_env_vars.
Parameters:
char **vars - Returned from nstd_std_env_vars.
Gets an environment variable.
Parameters:
const char *const k - The var key.
Returns: char *v - The value of the variable.
Removes an environment variable.
This will not free memory allocated by nstd_std_env_get_var.
Parameters:
const char *const k - The var key.
Sets the current working directory.
Parameters:
const char *const path - The new working directory.
Returns: int errc - Nonzero on error.
Sets an environment variable.
Parameters:
const char *const k - The var key.
const char *const v - The var value.
Returns the path of a temporary directory.
Use nstd_std_env_free_path to free memory allocated by this function.
Returns: char *path - The path of the temp dir.
Returns an array of strings that contain the environment variables.
Parameters:
NSTDUSize *size - Number of variables.
Returns: char *vars - The environment variables keys.