Determining the number of decimal digits in a BigInt requires examination of the ulong/uint data. It would be useful to have a straightforward method of doing so. I recommend making the std.internal.math.biguintcore functions peekUlong and peekUint visible at the std.bigint level by adding the following functions to std.bigint: ulong ulongDigit(int n) pure nothrow const @safe @nogc { return data.peekUlong(n); } uint uintDigit(int n) pure nothrow const @safe @nogc { return data.peekUint(n); } I've readied a pull request to add these functions to std.bigint
> I've readied a pull request to add these functions to std.bigint Are you still working on this?
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/dae55d039c8392246514caf6ada93cbb82320511 Fix Issue 17249: Added BigInt.getDigit https://github.com/dlang/phobos/commit/adee662094e6d4f2976e60267c1a552ba9331781 Merge pull request #5987 from JackStouffer/issue17249 Fix Issue 17249: Added BigInt.getDigit