AnsiCmd (open)

Generate ANSI-escape codes.

Syntax

LOADLIB "wh::os.whlib";

STRING FUNCTION AnsiCmd(STRING types)

Parameters

STRING types

Comma-separated list of codes to generate. The following codes are supported:

Return value

STRING

ANSI escape sequences

Examples

// Prints a red word
PRINT(`${AnsiCmd("red")}red${AnsiCmd("reset")}`);