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

Function bufferToAscii

recipes/Python/577243_Hex_Dump/recipe-577243.py:16–27  ·  view source on GitHub ↗
(buffer, start, count)

Source from the content-addressed store, hash-verified

14 return accumulator
15
16def bufferToAscii(buffer, start, count):
17 accumulator = ''
18 for item in range(count):
19 char = chr(buffer[start + item])
20 if char in ascii_letters or \
21 char in digits or \
22 char in punctuation or \
23 char == ' ':
24 accumulator += char
25 else:
26 accumulator += '.'
27 return accumulator
28
29index = 0
30size = 20

Callers 1

recipe-577243.pyFile · 0.85

Calls 1

rangeFunction · 0.85

Tested by

no test coverage detected