MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / extractBlock

Function extractBlock

scripts/check-unicode-sync.mjs:41–49  ·  view source on GitHub ↗
(text, startMarker)

Source from the content-addressed store, hash-verified

39}
40
41function extractBlock(text, startMarker) {
42 const start = text.indexOf(startMarker);
43 if (start < 0) throw new Error(`missing marker: ${startMarker}`);
44 const brace = text.indexOf("{", start);
45 if (brace < 0) throw new Error(`missing '{' after marker: ${startMarker}`);
46 const end = text.indexOf("};", brace);
47 if (end < 0) throw new Error(`missing '};' terminator for marker: ${startMarker}`);
48 return text.slice(brace + 1, end);
49}
50
51function parseGcbEnum(headerText) {
52 const start = headerText.indexOf("typedef enum zr_gcb_class_t");

Callers 2

parseIncGcbRangesFunction · 0.85
parseIncPairRangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected