eraseLastLine method

void eraseLastLine()

Implementation

void eraseLastLine() {
  stdout.write('\x1B[1A'); // Move the cursor up one line
  stdout.write('\x1B[K'); // Clear the line
}