fn setenv
Sets an environment variable of this process. Static configuration is not affected: it was loaded at startup (§14.1).
Example:
fn main() io {
setenv("OXL_DOC_EXAMPLE", "yes")
print("{env("OXL_DOC_EXAMPLE") ?? "unset"}")
}Output
yes
@intrinsic("setenv") pub(api) fn setenv(name: str, value: str) ioSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
name | str |
value | str |
Effects
io
Defined in: std/core/functions.oxl:60