signedBinaryToDecimal function
Convert bignum
to a signed decimal number
@param minDigits 0-pad result to this many digits
Implementation
String signedBinaryToDecimal(Uint8List bignum, {int minDigits = 1}) {
if (isNegative(bignum)) {
var x = bignum.getRange(0, 0) as Uint8List;
negate(x);
return '-' + binaryToDecimal(x, minDigits: minDigits);
}
return binaryToDecimal(bignum, minDigits: minDigits);
}