pub fn terminal_size() -> Option<(Width, Height)>
Expand description

Returns the size of the terminal defaulting to STDOUT, if available.

Note that this returns the size of the actual command window, and not the overall size of the command window buffer

Examples found in repository?
examples/get_size.rs (line 48)
45
46
47
48
49
50
51
52
fn main() {
    println!(
        "Size from terminal_size():                    {:?}",
        terminal_size::terminal_size()
    );

    run();
}