Function nstd_sys::env::nstd_env_set_var
source · #[no_mangle]
pub unsafe extern "C" fn nstd_env_set_var(
key: &NSTDStr,
value: &NSTDStr
)Available on crate feature
nstd_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:
-
keyis empty or contains either of the following ASCII characters:'='or'\0'. -
valuecontains the ASCII null character'\0'.
Safety
The user of this function must ensure that both key and value are valid for reads.