diff --git a/libs/bigint/bigint.lua b/libs/bigint/bigint.lua index 86ddee5..643e0b4 100644 --- a/libs/bigint/bigint.lua +++ b/libs/bigint/bigint.lua @@ -106,6 +106,12 @@ function bigint.abs(big) return result end +-- Return the number of digits in the big +function bigint.digits(big) + bigint.check(big) + return #big.digits +end + -- Convert a big to a number or string function bigint.unserialize(big, output_type, precision) bigint.check(big)