Console

Definitions

def bgBlack(s: a): String with ToString[a] Source

Returns the string s with background color of the default black color.

def bgBlackBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default black color.

def bgBlue(s: a): String with ToString[a] Source

Returns the string s with background color of the default blue color.

def bgBlueBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default blue color.

def bgCyan(s: a): String with ToString[a] Source

Returns the string s with background color of the default cyan color.

def bgCyanBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default cyan color.

def bgGreen(s: a): String with ToString[a] Source

Returns the string s with background color of the default green color.

def bgGreenBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default green color.

def bgMagenta(s: a): String with ToString[a] Source

Returns the string s with background color of the default magenta color.

def bgMagentaBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default magenta color.

def bgRed(s: a): String with ToString[a] Source

Returns the string s with background color of the default red color.

def bgRedBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default red color.

def bgWhite(s: a): String with ToString[a] Source

Returns the string s with background color of the default white color.

def bgWhiteBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default white color.

def bgYellow(s: a): String with ToString[a] Source

Returns the string s with background color of the default yellow color.

def bgYellowBright(s: a): String with ToString[a] Source

Returns the string s with background color of the default yellow color.

def black(s: a): String with ToString[a] Source

Returns the string s formatted with the default black color.

def blackBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright black color.

def blue(s: a): String with ToString[a] Source

Returns the string s formatted with the default blue color.

def blueBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright blue color.

def bold(s: a): String with ToString[a] Source

Returns s formatted as bold.

def cyan(s: a): String with ToString[a] Source

Returns the string s formatted with the default cyan color.

def cyanBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright cyan color.

def flush(_unit: Unit): Unit \ IO Source

Flushes the console output.

Note: This function does not flush standard out.

Warning: If no console is attached nothing happens.

See also System/StdOut.flush.

def green(s: a): String with ToString[a] Source

Returns the string s formatted with the default green color.

def greenBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright green color.

def hasConsole(_unit: Unit): Bool \ IO Source

Returns true if there is a Console object associated with the current JVM.

def hex(hexCode: String, s: a): String with ToString[a] Source

Returns s formatted with color hexCode or if there's an error, returns the original string. Expected format of hexCode: "#" + "--" + "--" + "--" where each -- is a hex number between 00 and FF.

def invisible(s: a): String with ToString[a] Source

Returns s formatted as reversed.

def italic(s: a): String with ToString[a] Source

Returns s formatted as blink.

def magenta(s: a): String with ToString[a] Source

Returns the string s formatted with the default magenta color.

def magentaBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright magenta color.

def print(x: a): Unit \ IO with ToString[a] Source

Converts x to a string and prints it to the console.

Note: This function does not print to standard out.

Warning: If no console is attached nothing is printed.

Use print instead.

See also System/StdOut.print.

def println(x: a): Unit \ IO with ToString[a] Source

Converts x to a string and prints it to the console followed by a new line.

Note: This function does not print to standard out.

Warning: If no console is attached nothing is printed.

Use print instead.

See also System/StdOut.println.

def readLine(_unit: Unit): Result[String, String] \ IO Source

Reads a single line from the console.

Returns Err if no console is present, there is an IO error, or EOF is found.

See also System/StdIn.readLines.

def red(s: a): String with ToString[a] Source

Returns the string s formatted with the default red color.

def redBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright red color.

def reset(_unit: Unit): String Source

Returns the reset control sequence as a string.

def reversed(s: a): String with ToString[a] Source

Returns s formatted as reversed.

def rgb(c: (Int32, Int32, Int32), s: String, opts: { isFg = Bool }): String Source

Returns the string s formatted with the given RGB color c.

def underline(s: a): String with ToString[a] Source

Returns s formatted as underline.

def white(s: a): String with ToString[a] Source

Returns the string s formatted with the default white color.

def whiteBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright white color.

def yellow(s: a): String with ToString[a] Source

Returns the string s formatted with the default yellow color.

def yellowBright(s: a): String with ToString[a] Source

Returns the string s formatted with the default bright yellow color.