countDigits

Returns the number of decimal digits in a non-negative big integer

int
countDigits
(
T
)
(
in T m
)
if (
is(T == BigInt) ||
isUnsigned!T
)

Examples

auto big = BigInt(
  "1234567890_1234567890_1234567890_1234567890_1234567890" ~
  "1234567890_1234567890_1234567890_1234567890_1234567890_1");
assert(countDigits(big) == 101);

Meta