gix_quote::ansi_c

Function undo

Source
pub fn undo(input: &BStr) -> Result<(Cow<'_, BStr>, usize), Error>
Expand description

Unquote the given ansi-c quoted input string, returning it and all of the consumed bytes.

The input is returned unaltered if it doesn’t start with a " character to indicate quotation, otherwise a new unquoted string will always be allocated. The amount of consumed bytes allow to pass strings that start with a quote, and skip all quoted text for additional processing

See the tests for quotation examples.