Crate clearscreen[−][src]
Cross-platform terminal screen clearing.
This library provides a set of ways to clear a screen, plus a “best effort” convenience function to do the right thing most of the time.
Unlike many cross-platform libraries, this one exposes every available choice all the time, and only the convenience function varies based on compilation target or environmental factors.
90% of the time, you’ll want to use the convenience short-hand:
clearscreen::clear().expect("failed to clear screen");
For anything else, refer to the ClearScreen
enum.
If you are supporting Windows in any capacity, the is_windows_10()
documentation is
required reading.
Enums
ClearScreen | Ways to clear the screen. |
Error | Error type. |
Functions
clear | Shorthand for |
is_microsoft_terminal | Detects Microsoft Terminal. |
is_windows_10 | Detects Windows ≥10. |