/ Python has a built-in function for this, but Scala doesn't
// so we have to do it ourselves. Uses the alphabet 0-9A-Z for
// bases 2-36
var result = 0
for (character <- s) {
result *= radix
result += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(
character.toUpper
)
}
result