Sha256: c7e5f27e39e07ab0d8e333b794e15fa235fc7828f503ef2e8be326d9874c726d
Contents?: true
Size: 326 Bytes
Versions: 396
Compression:
Stored size: 326 Bytes
Contents
object Hexadecimal { private val hexChars = ('0'..'9') + ('a'..'f') fun toDecimal(s: String): Int { return s.toLowerCase().fold(0, { accum, char -> when (char) { in hexChars -> hexChars.indexOf(char) + (accum * 16) else -> return 0 } }) } }
Version data entries
396 entries across 396 versions & 1 rubygems