supports-unicode

Crates.iosupports-unicode
lib.rssupports-unicode
version3.0.0
sourcesrc
created_at2021-09-11 07:00:55.89234
updated_at2024-02-04 03:00:37.144466
descriptionDetects whether a terminal supports unicode.
homepage
repositoryhttps://github.com/zkat/supports-unicode
max_upload_size
id449639
size18,919
Kat Marchán (zkat)

documentation

https://docs.rs/supports-unicode

README

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.

Example

use supports_unicode::Stream;

if supports_unicode::on(Stream::Stdout) {
    println!("stdout supports unicode output");
} else {
    println!("no unicode, please");
}

MSRV

This crate requires rustc 1.70.0 or later.

Commit count: 16

cargo fmt