stripTerminalControls static method
Removes terminal escape sequences and non-line control characters.
Implementation
static String stripTerminalControls(String text) {
return text
.replaceAll(_terminalControlSequences, '')
.replaceAll(_nonLineControlCharacters, '');
}