translate - luxembourg/muxcode-clm GitHub Wiki
TRANSLATE()
FUNCTION: translate(<string>, <type>)
This function converts all raw ANSI color codes, carriage returns, and tabs to either MUX substitutions or to spaces. If <type> is 0 or 's', the raw codes are converted to spaces, if it is 1 or 'p', the codes are converted to MUX %c and %r substitutions.
Because multiple spaces can be compressed into a single space, if <type> is 1 or 'p', multiple spaces are converted to a series of '%b' followed by a single space.