WithRadix

trait WithRadix[T] extends FromDigits[T]

A subclass of FromDigits that also allows to convert whole number literals with a radix other than 10

Source:
FromDigits.scala
trait FromDigits[T]
class Object
trait Matchable
class Any
object BigIntFromDigits.type

Value members

Abstract methods

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

Convert 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.

Convert 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.

Source:
FromDigits.scala

Concrete methods

def fromDigits(digits: String): T

Convert digits string to value of type T digits can contain

Convert digits string to value of type T digits can contain

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

if digit string is not legal for the given type

NumberTooLarge

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

NumberTooSmall

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

Source:
FromDigits.scala