Detects whether a terminal supports unicode.
- Rust 100%
| .github | meta: add funding.yml | |
| src | feat(deps): Switch to std::io::IsTerminal ( #5 ) | |
| .editorconfig | feat(api): initial commit | |
| .gitignore | feat(api): initial commit | |
| Cargo.toml | chore: Release supports-unicode version 3.0.0 | |
| CHANGELOG.md | docs: update changelog | |
| cliff.toml | meta: fix cliff.toml | |
| LICENSE | feat(api): initial commit | |
| Makefile.toml | feat(api): initial commit | |
| README.md | docs: make note of new MSRV in 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
usesupports_unicode::Stream;ifsupports_unicode::on(Stream::Stdout){println!("stdout supports unicode output");}else{println!("no unicode, please");}MSRV
This crate requires rustc 1.70.0 or later.