MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / parse_hexstring

Function parse_hexstring

Scripts/json_config_parse.py:178–189  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

176}
177
178def parse_hexstring(s):
179 length = 0
180 byte_data = []
181 for num in s.split(' '):
182 if s.startswith("0x"):
183 num = num[2:]
184 while len(num) > 0:
185 byte_num = num[-2:]
186 byte_data.append(int(byte_num, 16))
187 length += 1
188 num = num[0:-2]
189 return length, byte_data
190
191
192def parse_json(json_text, output_file):

Callers 1

parse_jsonFunction · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected