ΒΆvoid set_var(const std::string& key,
const std::string& value) noexcept
void set_var(const std::string& key,
const std::string& value) noexcept
Description
Sets the environment variable `key` to the value `value` for the currently running process. # Panics This function may panic if the `key` or `value` are not a valid multi-byte encoding for the current locale (typically utf8). This function may panic if `key` is empty, contains the equals sign character `'='` or the NUL character `' \ 0'` (except as the terminating character), or when `value` contains the NUL character (except as the terminating character). TODO: [Figure out](https://github.com/chromium/subspace/issues/326) a nicer way to receive unowned possibly-null-terminated strings. string_view reports a size before the null so you can't tell and you need to copy from it.
Declared at: sus/env/var.h:74
Parameters
- const std::string& key
- const std::string& value