cursorUp static method

String cursorUp(
  1. int n
)

Returns an ANSI sequence that moves the cursor up by n rows.

Implementation

static String cursorUp(int n) => n == 1 ? '\x1b[A' : '\x1b[${n}A';