BigIntFromDigits

scala.util.FromDigits.BigIntFromDigits

Attributes

Source
FromDigits.scala
Graph
Supertypes
trait WithRadix[BigInt]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def fromDigits(digits: String, radix: Int): BigInt

Converts digits string with given radix to number of type T. E.g. if radix is 16, digits a..f and A..F are also allowed.

Converts digits string with given radix to number of type T. E.g. if radix is 16, digits a..f and A..F are also allowed.

Value parameters

digits

the string representation of the numeric literal to convert

radix

the base for the number system (e.g. 10 for decimal, 16 for hexadecimal)

Attributes

Source
FromDigits.scala

Inherited methods

def fromDigits(digits: String): BigInt

Converts digits string to value of type T digits can contain

Converts digits string to value of type T digits can contain

  • sign + or -
  • sequence of digits between 0 and 9

Value parameters

digits

the string representation of the numeric literal to convert

Attributes

Returns

the value of type T represented by the digit string

Throws
FromDigits.MalformedNumber

if digit string is not legal for the given type

FromDigits.NumberTooLarge

if value of result does not fit into T's range

FromDigits.NumberTooSmall

in case of numeric underflow (e.g. a non-zero floating point literal that produces a zero value)

Inherited from:
WithRadix
Source
FromDigits.scala