Skip to main content

symbol_stderr

Function symbol_stderr 

Source
pub fn symbol_stderr(s: &str) -> String
Expand description

Like symbol, but checks color support against stderr instead of stdout. Use this when the result is printed with eprintln! — checking the wrong stream means color escapes can be wrongly included or omitted when stdout and stderr have different redirection (e.g. cmd > log.txt with a real terminal still attached to stderr).