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

Function fxBigIntParseB

xs/sources/xsBigInt.c:474–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474void fxBigIntParseB(txBigInt* bigint, txString p, txSize length)
475{
476 txU4 data[1] = { 0 };
477 txBigInt digit = { .sign=0, .size=1, .data=data };
478 bigint->sign = 0;
479 bigint->size = 1;
480 bigint->data[0] = 0;
481 while (length) {
482 char c = *p++;
483 data[0] = c - '0';
484 fxBigInt_uadd(NULL, bigint, fxBigInt_ulsl1(NULL, bigint, bigint, 1), &digit);
485 length--;
486 }
487}
488
489void fxBigIntParseO(txBigInt* bigint, txString p, txSize length)
490{

Callers 2

fxGetNextNumberBFunction · 0.85
fxStringToBigIntFunction · 0.85

Calls 2

fxBigInt_uaddFunction · 0.85
fxBigInt_ulsl1Function · 0.85

Tested by

no test coverage detected