Skip to main content

fmt_name

Function fmt_name 

Source
pub fn fmt_name(name: &str) -> impl Display + '_
Expand description

Displays name with every character that could rewrite or hide terminal output escaped: C0 controls and DEL (\0 \t \n \r by name, the rest \xHH), C1 controls (\u{HH}) and the bidi embeddings, overrides and isolates U+202A–U+202E and U+2066–U+2069 (\u{HHHH}). Everything else — backslashes, quotes, spaces, other non-ASCII — is written unchanged, so a name with nothing to escape displays exactly as before. For display only: not reversible, and never used for a name stuffr writes or matches.