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

Function fxCESU8Compare

xs/sources/xsCommon.c:1070–1082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1068#if mxCESU8
1069
1070int fxCESU8Compare(txString p1, txString p2)
1071{
1072 txInteger c1, c2;
1073 while (*p1 && *p2) {
1074 p1 = fxCESU8Decode(p1, &c1);
1075 p2 = fxCESU8Decode(p2, &c2);
1076 if (c1 < c2) return -1;
1077 if (c1 > c2) return 1;
1078 }
1079 if (*p1) return 1;
1080 if (*p2) return -1;
1081 return 0;
1082}
1083
1084txString fxCESU8Decode(txString string, txInteger* character)
1085{

Callers

nothing calls this directly

Calls 1

fxCESU8DecodeFunction · 0.85

Tested by

no test coverage detected