valid method
Whether the ansi string contains unallowed, cursor manipulating sequences.
Implementation
bool valid() =>
!RegExp(r'\x1B$$[0-9;]*[^m]').hasMatch(text) &&
!text.contains("\n") &&
!text.contains("\r");
Whether the ansi string contains unallowed, cursor manipulating sequences.
bool valid() =>
!RegExp(r'\x1B$$[0-9;]*[^m]').hasMatch(text) &&
!text.contains("\n") &&
!text.contains("\r");