MCPcopy Index your code
hub / github.com/python/cpython / get_fws

Function get_fws

Lib/email/_header_value_parser.py:1063–1073  ·  view source on GitHub ↗

FWS = 1*WSP This isn't the RFC definition. We're using fws to represent tokens where folding can be done, but when we are parsing the *un*folding has already been done so we don't need to watch out for CRLF.

(value)

Source from the content-addressed store, hash-verified

1061 return ''.join(vchars), ''.join([fragment[pos:]] + remainder), had_qp
1062
1063def get_fws(value):
1064 """FWS = 1*WSP
1065
1066 This isn't the RFC definition. We're using fws to represent tokens where
1067 folding can be done, but when we are parsing the *un*folding has already
1068 been done so we don't need to watch out for CRLF.
1069
1070 """
1071 newvalue = value.lstrip()
1072 fws = WhiteSpaceTerminal(value[:len(value)-len(newvalue)], 'fws')
1073 return fws, newvalue
1074
1075def get_encoded_word(value, terminal_type='vtext'):
1076 """ encoded-word = "=?" charset "?" encoding "?" encoded-text "?="

Callers 7

get_encoded_wordFunction · 0.85
get_unstructuredFunction · 0.85
get_bare_quoted_stringFunction · 0.85
get_commentFunction · 0.85
get_cfwsFunction · 0.85
get_domain_literalFunction · 0.85
get_parameterFunction · 0.85

Calls 2

WhiteSpaceTerminalClass · 0.85
lstripMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…