repeatPreviousCharacter static method

String repeatPreviousCharacter(
  1. int n
)

Returns an ANSI sequence to repeat the previous character n times.

Implementation

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