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

Function fxParseHex

xs/sources/xsCommon.c:837–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837txBoolean fxParseHex(txU1 c, txU4* value)
838{
839 if (('0' <= c) && (c <= '9'))
840 *value = (*value * 16) + (c - '0');
841 else if (('a' <= c) && (c <= 'f'))
842 *value = (*value * 16) + (10 + c - 'a');
843 else if (('A' <= c) && (c <= 'F'))
844 *value = (*value * 16) + (10 + c - 'A');
845 else
846 return 0;
847 return 1;
848}
849
850txBoolean fxParseHexEscape(txString* string, txInteger* character)
851{

Callers 3

fxDebugEvalBufferFunction · 0.85
fxParseHexEscapeFunction · 0.85
fxParseUnicodeEscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected