View source code
Display the source code in std/bigint.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
std.bigint.big_int.this
- multiple declarations
- Function BigInt.this
- Function BigInt.this
- Function BigInt.this
Function BigInt.this
Construct a BigInt
from a decimal or hexadecimal string.
The number must be in the form of a D decimal or hex literal:
It may have a leading + or - sign; followed by "0x" if hexadecimal.
Underscores are permitted.
Prototype
this(T)( T s );
BUG
Should throw a IllegalArgumentException/ConvError if invalid character found
Function BigInt.this
Construct a BigInt
from another BigInt
.
Prototype
this(T)( T x ) pure if (is(Unqual!T == BigInt));
Example
const(BigInt) b1 = BigInt("1_234_567_890"); BigInt b2 = BigInt(b1); assert(b2 == BigInt("1_234_567_890"));
Function BigInt.this
Construct a BigInt
from a built-in integral type.
Prototype
this(T)( T x ) pure if (isIntegral!T);
Example
ulong data = 1_000_000_000_000; auto bigData = BigInt(data); assert(data == BigInt("1_000_000_000_000"));
Authors
Don Clugston