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

Function PiuStringHexToNum

modules/piu/All/piuColor.c:237–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237uint32_t PiuStringHexToNum(const char *string, uint32_t i)
238{
239 uint32_t v = 0;
240 while (i) {
241 char c = c_read8(string++);
242 if (('0' <= c) && (c <= '9'))
243 v = (v << 4) + (c - '0');
244 else if (('a' <= c) && (c <= 'f'))
245 v = (v << 4) + (10 + c - 'a');
246 else if (('A' <= c) && (c <= 'F'))
247 v = (v << 4) + (10 + c - 'A');
248 else
249 break;
250 i--;
251 }
252 return v;
253}
254
255void Piu_blendColors(xsMachine* the)
256{

Callers 1

PiuColorDictionaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected