extensions library

The same operations as methods on String.

'…'.ansiRemoveEscapeCodes(), .lengthWithoutEscapeCodes, .ansiHasSgr and the rest, with the two enums their signatures name and the exception the insertions throw. Each call parses the string afresh, which is what makes them convenient and what makes a Parser worth keeping where the same string is asked more than one question.

Enums

ControlCodeStyle
How a control code is to be shown where it must be seen rather than obeyed.
ControlFunctionsC0
Control functions: elements of the C0 set.

Extensions

StringHasEscapeCodesExtension on String
Asking a string whether it carries escape codes, and of what kind.
StringParsingExtension on String
Shortcuts for the operations of Parser that take a string and give one back.
StringRemoveEscapeCodesExtension on String
Taking escape codes back out of a string, all of them or by kind.
StringShowControlCodesExtension on String
Showing the control codes in a string instead of sending them.
StringShowEscapeCodesExtension on String
Showing the escape sequences in a string instead of sending them.

Exceptions / Errors

UnfinishedSequenceException
Thrown where an insertion would land inside a control sequence the parser could not finish.