MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / get_string_at

Function get_string_at

tools/extract_metadata.py:292–296  ·  view source on GitHub ↗
(module, address)

Source from the content-addressed store, hash-verified

290
291
292def get_string_at(module, address):
293 seg, offset = find_segment_with_address(module, address)
294 data = module.read_at(seg.offset, seg.size)
295 str_end = data.find(b'\0', offset)
296 return data_to_string(data[offset:str_end])
297
298
299@dataclass(init=False)

Callers 1

extract_metadataFunction · 0.85

Calls 4

data_to_stringFunction · 0.85
read_atMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected