title: How to limit the number of characters in a string displayed using Scala
body: <p>I'm fairly new to Scala and don't know a lot of the syntax, so I'm looking for a little guidance. I'm reading in an ArrayList to a web page and displaying the information in a table format. Here is an example of the html in my page:</p>
  
  <pre><code>&lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;...&lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      @for(info &lt;- Info.all) {
        &lt;tr&gt;
            &lt;td&gt;@info.name&lt;/td&gt;
            &lt;td&gt;@info.id&lt;/td&gt;
            &lt;td&gt;@info.birthdate&lt;/td&gt;
            &lt;td&gt;@info.notes&lt;/td&gt;
        &lt;/tr&gt;
      }
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>What I'm trying to accomplish is for the "notes" column to be cut off after the first 12 characters of the field ('notes' is a String type). In other words, if there is more than 12 characters in the "notes" field of the ArrayList, then it needs to only display the first 12 characters and cut off the rest. Is there a way of doing this by using Scala? If not, then how should I approach this problem?</p>
  
  <p>Thank you for any help!</p>