stripAnsi function

String stripAnsi(
  1. String input
)

Strip all ANSI escape sequences from text.

Implementation

String stripAnsi(String input) {
  return input.replaceAll(RegExp(r'\x1B\[[0-9;]*[a-zA-Z]'), '');
}