Ansi escape sequences rust8/15/2023 version(bold green) will print a symbol followed by the content of variable. red or bg-red), rgb(n,n,n) or bg-rgb(n,n,n). on(red bold) will print a string on with bold text colored red. Valid strings are any property from the ansi.style object (e.g. One or more style strings to apply to the input string. Partial, inline styling can also be applied using the syntax anywhere within the string. styles ( 'green' ) '\u001b ) '\u001b ) '\u001b[41m\u001b[38 2 200 200 200m'Ī convenience function, applying the styles provided in styleArray to the input string. src A crate for stripping ANSI escape sequences from byte sequences. Kind: static enum of ansi-escape-sequences Various formatting styles (aka Select Graphic Rendition codes). If n is one, clear from cursor to beginning of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is 2, clear entire screen.Įrases part of the line. If n is 1, clear from cursor to beginning of the screen. If n is 0 (or missing), clear from cursor to end of screen. The values are 1-based, and default to 1 (top left corner) if omitted.Ĭlears part of the screen. Moves cursor to beginning of the line n lines up. This package contains library source intended for building other packages which use the bitflags feature of the. Moves cursor to beginning of the line n lines down. If the cursor is already at the edge of the screen, this has no effect This can be used to take output from a program that includes escape sequences and write it somewhere that does not easily support them, such as a log file. If the cursor is already at the edge of the screen, this has no effect stripansiescapes - Rust Crate stripansiescapes src A crate for stripping ANSI escape sequences from byte sequences. This essentially turns all of the ANSI sequences into enums and splits the string at every location that there was an ANSI Sequence. This is done through a pulldown type parser, where an iterator is exposed. If the cursor is already at the edge of the screen, this has no effect Ansi Escape Sequence Parser For a complete list of implemented sequences, see the documentation. Kind: static property of ansi-escape-sequences
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |