MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_fws

Function get_fws

Lib/email/_header_value_parser.py:1046–1056  ·  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

1044 return ''.join(vchars), ''.join([fragment[pos:]] + remainder), had_qp
1045
1046def get_fws(value):
1047 """FWS = 1*WSP
1048
1049 This isn't the RFC definition. We're using fws to represent tokens where
1050 folding can be done, but when we are parsing the *un*folding has already
1051 been done so we don't need to watch out for CRLF.
1052
1053 """
1054 newvalue = value.lstrip()
1055 fws = WhiteSpaceTerminal(value[:len(value)-len(newvalue)], 'fws')
1056 return fws, newvalue
1057
1058def get_encoded_word(value, terminal_type='vtext'):
1059 """ 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 3

WhiteSpaceTerminalClass · 0.85
lenFunction · 0.85
lstripMethod · 0.45

Tested by

no test coverage detected