StringParsingExtension extension

Shortcuts for the operations of Parser that take a string and give one back.

Build a Parser instead when more than one of them is wanted from the same string: each of these parses it anew.

on

Methods

ansiInsertAfter(int pos, String text) String

Available on String, provided by the StringParsingExtension extension

Returns the string with text inserted at the plain text pos, behind the escape codes standing there.
ansiInsertBefore(int pos, String text) String

Available on String, provided by the StringParsingExtension extension

Returns the string with text inserted at the plain text pos, in front of the escape codes standing there.
ansiOptimizeControlFunctions({bool close = true}) String

Available on String, provided by the StringParsingExtension extension

Returns the string with the escape codes folded together.
ansiShowControlFunctions({String open = '[', String close = ']'}) String

Available on String, provided by the StringParsingExtension extension

Returns the string with every escape code replaced by its identifier.