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

Function fxGetCharacter

xs/sources/xsre.c:2653–2669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2651}
2652
2653txInteger fxGetCharacter(txString input, txInteger offset, txInteger flags)
2654{
2655 txInteger character;
2656#if mxCESU8
2657 if (flags & XS_REGEXP_UV)
2658 mxStringByteDecode(input + offset, &character);
2659 else
2660 fxUTF8Decode(input + offset, &character);
2661#else
2662 mxStringByteDecode(input + offset, &character);
2663#endif
2664 if (flags & XS_REGEXP_I) {
2665 txBoolean flag = (flags & XS_REGEXP_UV) ? 1 : 0;
2666 character = fxCharCaseCanonicalize(character, flag);
2667 }
2668 return character;
2669}
2670
2671txBoolean fxMatchCharacter(txInteger* characters, txInteger character)
2672{

Callers 1

fxMatchRegExpFunction · 0.85

Calls 2

fxUTF8DecodeFunction · 0.85
fxCharCaseCanonicalizeFunction · 0.85

Tested by

no test coverage detected