Skip to main content

plain

Function plain 

Source
pub fn plain(text: &str) -> String
Expand description

What: The text with every control character replaced by ?. Why: A path in a sentence on a terminal or in the journal must not carry an escape sequence or start a line.

In TS you’d write (pseudocode):

text.replace(/\p{Cc}/gu, '?')