| BigIntegerStatic: ToString |
Returns a human readable string of characters representing the number.
Public Function ToString( ByVal x As BigInteger, Optional ByVal format As String ) As String
"X" and "x" for hex in either upper or lowercase. "B" or "b" for a binary representation of 1s and 0's. Everything else defaults to a decimal display.
The specifier can also contain a number of mininum digits to be displayed. If the value isnt long enough to reach the mininum digits, then leading 0's, 1's, or FFs will be added to the beginning of the output.
Dim b As BigInteger
Set b = BInt(-200)
Debug.Print b.ToString("d8") ' -00000200
Debug.Print b.ToString("d") ' -200
Debug.Print b.ToString("x8") ' ffffff38
Debug.Print b.ToString("x") ' ff38
Debug.Print b.ToString("b8") ' 1111111100111000
Debug.Print b.ToString("b") ' 1111111100111000
If no format is specified, the default of "d" is used.
Project VBCorLib Overview Class BigIntegerStatic Overview BigIntegerStatic Properties BigIntegerStatic Methods TestBit TryParse