commit | cd948cb46e9eafb2e428532a659dac5a0216e170 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon May 02 07:05:43 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon May 02 07:05:43 2022 +0000 |
tree | 4c9b727840e948d59f3b39214ffa2dbaff0d39e3 | |
parent | deaa7145770c54caf0e69006748150d77d77af13 [diff] | |
parent | b0635c5ca913a4adac28e61dd66ffbc1e6e3427d [diff] |
Snap for 8523903 from b0635c5ca913a4adac28e61dd66ffbc1e6e3427d to main-cg-testing-release Change-Id: I73591b195c011f55d64a17680ecec95d9cfea8f8
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.