nstd_env_set_var

Function nstd_env_set_var 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nstd_env_set_var( key: &NSTDStr, value: &NSTDStr, )
Available on crate feature env only.
Expand description

Sets an environment variable for the current process.

§Parameters:

  • const NSTDStr *key - The environment variable’s identification key.

  • const NSTDStr *value - The environment variable’s value.

§Panics

This operation will panic in the following situations:

  • key is empty or contains either of the following ASCII characters: '=' or '\0'.

  • value contains the ASCII null character '\0'.

§Safety

The user of this function must ensure that both key and value are valid for reads.