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

Function fxBigIntParseO

xs/sources/xsBigInt.c:489–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void fxBigIntParseO(txBigInt* bigint, txString p, txSize length)
490{
491 txU4 data[1] = { 0 };
492 txBigInt digit = { .sign=0, .size=1, .data=data };
493 bigint->sign = 0;
494 bigint->size = 1;
495 bigint->data[0] = 0;
496 while (length) {
497 char c = *p++;
498 data[0] = c - '0';
499 fxBigInt_uadd(NULL, bigint, fxBigInt_ulsl1(NULL, bigint, bigint, 3), &digit);
500 length--;
501 }
502}
503
504void fxBigIntParseX(txBigInt* bigint, txString p, txSize length)
505{

Callers 2

fxGetNextNumberOFunction · 0.85
fxStringToBigIntFunction · 0.85

Calls 2

fxBigInt_uaddFunction · 0.85
fxBigInt_ulsl1Function · 0.85

Tested by

no test coverage detected