commit | b0635c5ca913a4adac28e61dd66ffbc1e6e3427d | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Thu Apr 28 11:32:18 2022 -0700 |
committer | Bob Badour <bbadour@google.com> | Thu Apr 28 11:32:18 2022 -0700 |
tree | 4c9b727840e948d59f3b39214ffa2dbaff0d39e3 | |
parent | 370a742066852c2db7076bfa95eac9cc7fb54806 [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/terminal-size Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Change-Id: Ifb53e3827fcdf33a10ec4712752d79ceba38dd65
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.