commit | 34e050e56bfaa18d71ac69af4510b83764cffb96 | [log] [tgz] |
---|---|---|
author | Bob Badour <[email protected]> | Mon May 02 21:29:37 2022 +0000 |
committer | Automerger Merge Worker <[email protected]> | Mon May 02 21:29:37 2022 +0000 |
tree | 4c9b727840e948d59f3b39214ffa2dbaff0d39e3 | |
parent | 426ee43e9b0442f6fb0753b545a103d966fd17f2 [diff] | |
parent | b0635c5ca913a4adac28e61dd66ffbc1e6e3427d [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/terminal-size am: b0635c5ca9 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/terminal-size/+/2079807 Change-Id: If741f1f28dc2fc7d0e46fca60cf48acf3c7d64d7 Signed-off-by: Automerger Merge Worker <[email protected]>
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.