Skip to main content

char_is_printable

Function char_is_printable 

Source
pub fn char_is_printable(c: char) -> bool
Expand description

CPython str.isprintable() for a single char: printable unless its Unicode general category is Other (Cc/Cf/Cs/Co/Cn) or Separator (Zl/Zp/Zs). ASCII space (U+0020) is the sole exception — printable despite being a Zs separator. Drives both str.isprintable() and repr escaping so they agree.