strip static method
Strip all ansi escape sequences from line
.
This method is useful when logging messages or if you need to calculate the number of printable characters in a message.
Implementation
static String strip(String line) =>
line.replaceAll(RegExp('\x1b\\[[0-9;]+m'), '');