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

Function stringToLong

recipes/Python/577674_Bitmap_Maker/recipe-577674.py:70–71  ·  view source on GitHub ↗
(input_string, offset)

Source from the content-addressed store, hash-verified

68 return chr(i & 0xff) + chr(i >> 8 & 0xff) + chr(i >> 16 & 0xff)
69
70def stringToLong(input_string, offset):
71 return ord(input_string[offset+3]) << 24 | ord(input_string[offset+2]) << 16 | ord(input_string[offset+1]) << 8 | ord(input_string[offset])
72
73def stringToLong24(input_string, offset):
74 return ord(input_string[offset+2]) << 16 | ord(input_string[offset+1]) << 8 | ord(input_string[offset])

Callers 1

loadImageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected