Closed ynohtna closed 1 year ago
A simple 2 argument variant of Std.getenv where the second string argument is the default value returned if the requested environment variable is unset.
Simplifies
Std.getenv("COOL_PROG_OSC_ADDRESS") => string addr; if (addr == "") { "127.0.0.1" => addr; }
to Std.getenv("COOL_PROG_OSC_ADDRESS", "127.0.0.1") => string osc_in_port;
Std.getenv("COOL_PROG_OSC_ADDRESS", "127.0.0.1") => string osc_in_port;
A simple 2 argument variant of Std.getenv where the second string argument is the default value returned if the requested environment variable is unset.
Simplifies
to
Std.getenv("COOL_PROG_OSC_ADDRESS", "127.0.0.1") => string osc_in_port;