Infinite digits integers
Makes a BigInt from an integer string, positive or negative
fromString "123" == Just (BigInt.Pos ...)
fromString "-123" == Just (BigInt.Neg ...)
fromString "" == Nothing
fromString "this is not a number :P" == NothingMakes a BigInt from a base16 hex string, positive or negative.
fromHexString "456" == Just (BigInt.Pos ...)
fromHexString "-123" == Just (BigInt.Neg ...)
fromHexString "0x456" == Just (BigInt.Pos ...)
fromHexString "-0x123" == Just (BigInt.Neg ...)
fromHexString "R2D2" == Nothing
fromHexString "0xC3P0" == Nothing
fromHexString "0x" == Nothing
fromHexString "" == NothingNote: String can be prepended with or without any combination of "0x", and "+" or "-".
Convert the BigInt to a hex string.
toHexString (BigInt.fromInt 255) == "ff"Note: "0x" will NOT be prepended to the output.