MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _do_first_level_encoding

Function _do_first_level_encoding

pager_lib/nmb/utils.py:16–18  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

14 name = name.ljust(15) + chr(type)
15
16 def _do_first_level_encoding(m):
17 s = ord(m.group(0))
18 return string.ascii_uppercase[s >> 4] + string.ascii_uppercase[s & 0x0f]
19
20 encoded_name = chr(len(name) * 2) + re.sub('.', _do_first_level_encoding, name)
21 if scope:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected