supports-unicode 3.0.0

Detects whether a terminal supports unicode.
Documentation
  • Coverage
  • 66.67%
    4 out of 6 items documented1 out of 4 items with examples
  • Size
  • Source code size: 18.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 315.81 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • zkat/supports-unicode
    13 5 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zkat

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.