Reference

class GhoStr(disentangle, value, mutate=None)

A str clone that ignores every second value yielded by disentangle.

Offers every behavior and method available via str alongside the ones detailed bellow.

All interactions return a plain str object. Using str returns the internal value.

clean()

Remove all matches.

merge(full=False)

Remove all sequential matches.

For example, if X is matches, then 'XXAXBX' would become 'XAXBX' or 'XAXB' if full.

This is handy for clearing leftover matches after mutation operations.

class CleanGhoStr(disentangle, value, mutate=None)

Just like its parent, but attempts to keep sequential matches at a minimal.

class ANSISGRGhoStr(value)

Used to handle ANSI SGR sequences.

Formatting respects pre-placeholder attributes and continues them.

Merging does not rid of sequences that have overlapping effects.