MCPcopy Create free account
hub / github.com/ActiveState/code / dump

Function dump

recipes/Python/572181_Unicode_String_Hex_Dump/recipe-572181.py:17–22  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

15
16""" dump any string to formatted hex output """
17def dump(s):
18 import types
19 if type(s) == types.StringType:
20 return dumpString(s)
21 elif type(s) == types.UnicodeType:
22 return dumpUnicodeString(s)
23
24FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)])
25

Callers 3

testFunction · 0.70
commitMethod · 0.50
saveMethod · 0.50

Calls 2

dumpStringFunction · 0.85
dumpUnicodeStringFunction · 0.85

Tested by

no test coverage detected