Function Subspace :: sus :: env :: set_var

auto set_var(const std::string& key, const std::string& value) -> void

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 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.