Crates.io | supports-unicode |
lib.rs | supports-unicode |
version | 3.0.0 |
source | src |
created_at | 2021-09-11 07:00:55.89234 |
updated_at | 2024-02-04 03:00:37.144466 |
description | Detects whether a terminal supports unicode. |
homepage | |
repository | https://github.com/zkat/supports-unicode |
max_upload_size | |
id | 449639 |
size | 18,919 |
Detects whether a terminal supports unicode.
This crate is a Rust port mashing together
@sindresorhus'
is-unicode-supported
and
@iarna's
has-unicode
NPM packages.
use supports_unicode::Stream;
if supports_unicode::on(Stream::Stdout) {
println!("stdout supports unicode output");
} else {
println!("no unicode, please");
}
This crate requires rustc 1.70.0 or later.