Provides functions to quote and possibly unquote strings with different quoting styles.
Examples
use ByteSlice;
let shell_argument = single;
assert_eq!;
let input = br#""line\nbreak""#.as_bstr;
let = undo.unwrap;
assert_eq!;
assert_eq!;
Provides functions to quote and possibly unquote strings with different quoting styles.
use bstr::ByteSlice;
let shell_argument = gix_quote::single("hello it's git!".into());
assert_eq!(shell_argument, "'hello it'\\''s git'\\!''");
let input = br#""line\nbreak""#.as_bstr();
let (unquoted, consumed) = gix_quote::ansi_c::undo(input).unwrap();
assert_eq!(unquoted.as_ref(), b"line\nbreak".as_bstr());
assert_eq!(consumed, input.len());