ansi-color-filter-apply

ansi-color-filter-apply is a compiled Lisp function in `ansi-color.el'.

(ansi-color-filter-apply STRING)

Filter out all ANSI control sequences from STRING.

Every call to this function will set and use the buffer-local variable
`ansi-color-context' to save partial escape sequences. This information
will be used for the next call to `ansi-color-apply'. Set
`ansi-color-context' to nil if you don't want this.

This function can be added to `comint-preoutput-filter-functions'.