consolestatictext

Zero dependency crate for logging text that should stay in the same place in a console. This measures words to handle wrapping and has some console resizing support. Example use might be for displaying progress bars or rendering selections.

Example use with the console crate:

```rs use consolestatictext::ConsoleSize; use consolestatictext::ConsoleStaticText; use consolestatictext::ConsoleStaticTextOptions;

let mut statictext = ConsoleStaticText::new( ConsoleStaticTextOptions { // I honestly haven't tested this stripansicodes: Box::new(console::stripansicodes), consolesize: Box::new(|| { let size = console::Term::stderr().size(); ConsoleSize { rows: size.0, cols: size.1, } }), }, );

statictext.eprint("initial\ntext"); // will clear the previous text and put this new text statictext.eprint("new text");

// or get the text manually if let Some(text) = statictext.getupdate_text("new text") { eprint!("{}", text); }

// clear out the previous text statictext.eprintclear();

// todo: document hanging indent support ```