pub fn unescape_unquote_string(
bytes: &[u8],
span: Span,
) -> (String, Option<ParseError>)Expand description
Unescapes and unquotes a string, returning the content and any parse errors.
This function handles both quoted and unquoted strings, processing POSIX escape sequences only within double-quoted strings. Single-quoted and unquoted strings are returned as-is after removing their delimiters.
ยงReturns
A tuple of (unescaped_string, parse_error) where:
unescaped_stringcontains the processed contentparse_errorisSomeif an invalid escape sequence was encountered,Noneotherwise