Skip to main content

incomplete_escape

Function incomplete_escape 

Source
pub(super) fn incomplete_escape(s: &str) -> usize
Expand description

The length in bytes of an escape sequence at the end of s that hasn’t ended yet: an ESC, a CSI (ESC [) without its final byte, or an OSC, DCS, APC or PM string without its terminator. A long one is let through: a string that never ends must not hold back everything after it.