MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / SzLookup

Function SzLookup

general.cpp:318–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316// that goes with the matched string, or -1 if the string is not found.
317
318int SzLookup(CONST StrLook *rgStrLook, CONST char *sz)
319{
320 CONST char *pch1, *pch2;
321 int irg;
322
323 for (irg = 0; rgStrLook[irg].isz >= 0; irg++) {
324 for (pch1 = sz, pch2 = rgStrLook[irg].sz;
325 *pch1 && ChCap(*pch1) == ChCap(*pch2); pch1++, pch2++)
326 ;
327 if (*pch1 == chNull && (*pch2 == chNull || pch1 - sz >= 3))
328 return rgStrLook[irg].isz;
329 }
330 return -1;
331}
332
333
334// Return whether a zero terminated string is a substring of another string,

Callers 1

NParseSzFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected