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

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

If STDOUT is not a tty, returns None

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();
}