title: Kotlin: strip first and last character
body: <p>In Kotlin, I need to strip the first and last characters from a string. This seems to be getting compile errors:</p>
  <pre><code>val MyPiece = str.substring(0, str.length - 1)
  </code></pre>
  <p>What's wrong here?</p>