commit | 8c5a1fe0f4c9c9e08739e7a2231a8923c308c3f3 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Aug 16 06:30:43 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Aug 16 06:30:43 2022 +0000 |
tree | 018c66fcc6aaa261baa14a1ee7b0287f05167171 | |
parent | c250f92e9d4961e1985f805056f4456e5f107f90 [diff] | |
parent | 427d44546617e3beabb2c5347655daa235bc4520 [diff] |
Snap for 8952093 from 427d44546617e3beabb2c5347655daa235bc4520 to sdk-release Change-Id: I8a92e7b4f8e8e48aedbb0dde8dc2e3951a469b06
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.