MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / nfkc_find

Function nfkc_find

internal/cbm/doc_pdf.c:121–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119/* ── normalise(): NFKC, zero-width characters dropped, hyphens unified ── */
120
121static const pdf_nfkc_t *nfkc_find(uint32_t cp) {
122 int lo = 0;
123 int hi = PDF_NFKC_COUNT - 1;
124 while (lo <= hi) {
125 int mid = lo + (hi - lo) / 2;
126 if (PDF_NFKC[mid].cp < cp) {
127 lo = mid + 1;
128 } else if (PDF_NFKC[mid].cp > cp) {
129 hi = mid - 1;
130 } else {
131 return &PDF_NFKC[mid];
132 }
133 }
134 return NULL;
135}
136
137static bool ucomp(uint32_t a, uint32_t b, uint32_t *out) {
138 /* Hangul, algorithmically */

Callers 1

normaliseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected