Process module

get_quoted_command_string

procedure · 1 overloadSource

Joins args into one command line with a space between them, each quoted as append_quoted does. The string is new, from context.allocator, and the caller frees it. Use it to show or log a command, or to build a Windows command line.

get_quoted_command_string :: (args: [] string) -> string

Parameters

args: [] string

Returns

string
Example
line := get_quoted_command_string(.["plain", "two words", "say\"hi"]);
assert(line == "plain \"two words\" \"say\\\"hi\"");
free(line);

Doesn't run in the browser (skipped on wasm).

See also