I am able to convert a single digit string to int using toInt:
scala> "1".toInt
res1: Int = 1
However, when I use map to iterate through the characters and convert them individually using toInt I am getting their ASCII codes:
scala> "123".map(_.toInt)
res2: scala.collection.immutable.IndexedSeq[Int] = Vector(49, 50, 51)
Why is that and is it possible to use map and toInt to accomplish this?