world.StripANSI
Strips ANSI colour sequences from a string
Prototype
BSTR StripANSI(BSTR Message);
Description
This removes ANSI colour sequences from a string.
The intention of this routine is to be used with incoming chat messages (which may have ANSI colour codes in them), if you want to display them in a plain colour, or reformat using your own colours.
VBscript example
Note StripANSI (incoming_message)
Jscript example
Note (StripANSI (incoming_message));
PerlScript example
Note (StripANSI (incoming_message));
Python example
world.Note (StripANSI (world.incoming_message))
Lua example
Note (StripANSI (incoming_message))
Return value
The supplied string with ANSI colour sequences removed.
Related topic
See also
| Function | Description |
|---|---|
| ANSI | Generates an ANSI colour sequence |
| ChatMessage | Sends a message to a chat user (raw format) |
| Note | Sends a note to the output window |