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

Function fxIsSpace

xs/sources/xsCommon.c:794–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792}
793
794txBoolean fxIsSpace(txInteger character)
795{
796 static const txU4 spaces[27] ICACHE_RODATA_ATTR = {
797 0x00000009,
798 0x0000000A,
799 0x0000000B,
800 0x0000000C,
801 0x0000000D,
802 0x00000020,
803 0x000000A0,
804 0x00001680,
805 0x00002000,
806 0x00002001,
807 0x00002002,
808 0x00002003,
809 0x00002004,
810 0x00002005,
811 0x00002006,
812 0x00002007,
813 0x00002008,
814 0x00002009,
815 0x0000200A,
816 0x00002028,
817 0x00002029,
818 0x0000202F,
819 0x0000205F,
820 0x00003000,
821 0x0000FEFF,
822 0xFFFFFFFF,
823 0x00000000,
824 };
825 const txU4 *p = spaces;
826 txU4 c = (txU4)character;
827 txU4 s;
828 while ((s = *p++)) {
829 if (c < s)
830 return 0;
831 if (c == s)
832 return 1;
833 }
834 return 0;
835}
836
837txBoolean fxParseHex(txU1 c, txU4* value)
838{

Callers 1

fxSkipSpacesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected