commit | c250f92e9d4961e1985f805056f4456e5f107f90 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 29 17:15:38 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 29 17:15:38 2022 +0000 |
tree | 018c66fcc6aaa261baa14a1ee7b0287f05167171 | |
parent | b0635c5ca913a4adac28e61dd66ffbc1e6e3427d [diff] | |
parent | 2adabfe95b4e3aa003be001c717e76343da0fee6 [diff] |
Snap for 8782634 from 2adabfe95b4e3aa003be001c717e76343da0fee6 to sdk-release Change-Id: I12e147d17ae90bd670fae70fe2145486157b8823
Rust library to getting the size of your terminal.
Works on Linux, MacOS, Windows, and illumos.
use terminal_size::{Width, Height, terminal_size}; let size = terminal_size(); if let Some((Width(w), Height(h))) = size { println!("Your terminal is {} cols wide and {} lines tall", w, h); } else { println!("Unable to get terminal size"); }
This crate requires a minimum rust version of 1.31.0 (2018-12-06)
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.