MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / str

Function str

src/extraction/kernel/decode.ts:39–44  ·  view source on GitHub ↗

Read an (offset, len) arena string; undefined when absent.

(arena: Buffer, row: Buffer, at: number)

Source from the content-addressed store, hash-verified

37
38/** Read an (offset, len) arena string; undefined when absent. */
39function str(arena: Buffer, row: Buffer, at: number): string | undefined {
40 const off = row.readUInt32LE(at);
41 if (off === NONE) return undefined;
42 const len = row.readUInt32LE(at + 4);
43 return arena.toString('utf8', off, off + len);
44}
45
46/** NUL-joined list field; undefined when absent. */
47function strList(arena: Buffer, row: Buffer, at: number): string[] | undefined {

Callers 2

strListFunction · 0.85
decodeExtractBuffersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected