All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spinal.lib.tools.binarySystem.StringToLiteral.scala Maven / Gradle / Ivy

There is a newer version: 1.10.2a
Show newest version
package spinal.lib.tools.binarySystem

object StringToLiteral {
  def hex(s: String): BigInt = {
    BigInt(s, 16)
  }

  def dec(s: String): BigInt = {
    BigInt(s, 10)
  }

  def oct(s: String): BigInt = {
    BigInt(s, 8)
  }

  def bin(s: String): BigInt = {
    BigInt(s, 2)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy