dechdev_rs 0.1.45

A Rust library by DECHDEV.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// Clears the console screen and positions the cursor at the top-left corner.
///
/// This function uses ANSI escape sequences to:
/// - Clear the entire screen (`[2J`)
/// - Move the cursor to position (1,1) which is the top-left corner (`[1;1H`)
///
/// # Note
/// This function will only work properly in terminals that support ANSI escape sequences.
/// On some Windows systems or terminals without ANSI support, this may not work as expected.
pub fn scroll_console() {
    print!("{esc}[2J{esc}[1;1H", esc = 27 as char);
}