Skip to content

Files

Latest commit

 

History

History
23 lines (17 loc) · 546 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 546 Bytes

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.