|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
ANSI escape sequence utilities. More...
Go to the source code of this file.
Functions | |
| char * | ansi_strip_escapes (const char *input, size_t input_len) |
| Strip all ANSI escape sequences from a string. | |
ANSI escape sequence utilities.
Functions for manipulating ANSI escape sequences in strings, including stripping all escape codes for plain text output.
Definition in file ansi.h.
| char * ansi_strip_escapes | ( | const char * | input, |
| size_t | input_len | ||
| ) |
Strip all ANSI escape sequences from a string.
Removes all ANSI CSI sequences (ESC [ ... final_byte) from the input, leaving only printable text. Useful for creating plain text output from colorized ASCII art.
| input | Input string containing ANSI escape sequences |
| input_len | Length of input string |
Definition at line 13 of file ansi.c.
References outbuf_t::buf, ob_putc(), ob_reserve(), and ob_term().