MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxIsInCharSet

Function fxIsInCharSet

xs/sources/xsre.c:11391–11407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11389#endif
11390
11391static txBoolean fxIsInCharSet(txInteger character, const txInteger* base, txInteger count)
11392{
11393 txInteger min = 0;
11394 txInteger max = count >> 1;
11395 while (min < max) {
11396 txInteger mid = (min + max) >> 1;
11397 txInteger begin = *(base + (mid << 1));
11398 txInteger end = *(base + (mid << 1) + 1);
11399 if (character < begin)
11400 max = mid;
11401 else if (character >= end)
11402 min = mid + 1;
11403 else
11404 return 1;
11405 }
11406 return 0;
11407}
11408
11409txInteger fxFinalSigmaToLower(txMachine* the, txInteger where, txInteger character)
11410{

Callers 1

fxFinalSigmaToLowerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected