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

Function fxFinalSigmaToLower

xs/sources/xsre.c:11409–11435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11407}
11408
11409txInteger fxFinalSigmaToLower(txMachine* the, txInteger where, txInteger character)
11410{
11411 txString s = mxThis->value.string;
11412 txInteger offset = where;
11413 for (;;) {
11414 txInteger former = fxFindCharacter(s, offset, -1, XS_REGEXP_UV);
11415 if (former == offset)
11416 return 0x03c3;
11417 mxStringByteDecode(s + former, &character);
11418 if (!fxIsInCharSet(character, gxCharSet_Binary_Property_Case_Ignorable, mxCharSet_Binary_Property_Case_Ignorable))
11419 break;
11420 offset = former;
11421 }
11422 if (!fxIsInCharSet(character, gxCharSet_Binary_Property_Cased, mxCharSet_Binary_Property_Cased))
11423 return 0x03c3;
11424 s += where + 2;
11425 for (;;) {
11426 s = mxStringByteDecode(s, &character);
11427 if (character == C_EOF)
11428 return 0x03c2;
11429 if (!fxIsInCharSet(character, gxCharSet_Binary_Property_Case_Ignorable, mxCharSet_Binary_Property_Case_Ignorable))
11430 break;
11431 }
11432 if (!fxIsInCharSet(character, gxCharSet_Binary_Property_Cased, mxCharSet_Binary_Property_Cased))
11433 return 0x03c2;
11434 return 0x03c3;
11435}
11436
11437#ifndef mxCompile
11438

Callers

nothing calls this directly

Calls 2

fxFindCharacterFunction · 0.85
fxIsInCharSetFunction · 0.85

Tested by

no test coverage detected