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

Function longToString

recipes/Python/577674_Bitmap_Maker/recipe-577674.py:62–65  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

60 return chr(lo) + chr(hi)
61
62def longToString(i):
63 hi = (int(i) & 0x7fff0000) >> 16
64 lo = int(i) & 0x0000ffff
65 return shortToString(lo) + shortToString(hi)
66
67def long24ToString(i):
68 return chr(i & 0xff) + chr(i >> 8 & 0xff) + chr(i >> 16 & 0xff)

Callers 2

Calls 1

shortToStringFunction · 0.85

Tested by

no test coverage detected