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

Function PiuCode_isSpace

modules/piu/PC/Code/piuCode.c:1198–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1196}
1197
1198void PiuCode_isSpace(xsMachine *the)
1199{
1200 PiuCode* self = PIU(Code, xsThis);
1201 xsStringValue string = PiuToString((*self)->string);
1202 xsIntegerValue character;
1203 int32_t offset = xsToInteger(xsArg(0));
1204 uint32_t classification;
1205 string += fxUnicodeToUTF8Offset(string, offset);
1206 fxUTF8Decode(string, &character);
1207 classification = PiuCodeClassifyCharacter(character);
1208 xsResult = xsBoolean(classification == teCharWhiteSpace);
1209}
1210
1211void PiuCode_locate(xsMachine *the)
1212{

Callers

nothing calls this directly

Calls 3

fxUnicodeToUTF8OffsetFunction · 0.85
fxUTF8DecodeFunction · 0.85
PiuCodeClassifyCharacterFunction · 0.85

Tested by

no test coverage detected