title: Scala int value of String characters
body: <p>I just want to sum the digits of a BigInt. I can do </p>
  
  <pre><code>scala&gt; "1 2 3".split(" ").map(_.toInt).sum
  res23: Int = 6
  </code></pre>
  
  <p>So I tried</p>
  
  <pre><code>scala&gt; BigInt(123).toString().map(_.toInt).sum
  res24: Int = 150
  </code></pre>
  
  <p>This doesn't work because it maps the characters to their Unicode values.</p>
  
  <p>Both the following work, but is there a more elegant way than using the Java static method or an extra toString conversion?</p>
  
  <pre><code>BigInt(123).toString().map(Character.getNumericValue(_)).sum
  BigInt(123).toString().map(_.toString.toInt).sum
  </code></pre>
  
  <p>(I've also done it using a recursive function, sidestepping strings altogether, but I'm interested here in a concise 1-liner.)</p>