MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / unquote

Function unquote

tools/python-3.11.9-amd64/Lib/email/utils.py:222–229  ·  view source on GitHub ↗

Remove quotes from a string.

(str)

Source from the content-addressed store, hash-verified

220
221# rfc822.unquote() doesn't properly de-backslash-ify in Python pre-2.3.
222def unquote(str):
223 """Remove quotes from a string."""
224 if len(str) > 1:
225 if str.startswith('"') and str.endswith('"'):
226 return str[1:-1].replace('\\\\', '\\').replace('\\"', '"')
227 if str.startswith('<') and str.endswith('>'):
228 return str[1:-1]
229 return str
230
231
232

Callers 5

decode_paramsFunction · 0.70
collapse_rfc2231_valueFunction · 0.70
get_auth_from_urlFunction · 0.50
parse_credentialsFunction · 0.50
split_filenameFunction · 0.50

Calls 3

startswithMethod · 0.80
endswithMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected