Skip to main content

unescape_string_literal

Convert quoted string literals to unquoted strings with escaped quotes and backslashes unquoted.

def unescape_string_literal(
s: string
) - > string

Convert quoted string literals to unquoted strings with escaped quotes and backslashes unquoted

Parameters

NameTypeDescription
sstringThe quoted string literal to be processed, which must start and end with the same quote character

Returns

TypeDescription
stringThe unquoted string with escaped characters restored to their literal form