title: Split string in GSP grails
body: <p>How to split a string and get first words?</p>
  
  <p><strong>studentController.groovy</strong></p>
  
  <pre><code>def student = {
       def ex = new ArrayList() 
       ex[0]= "Steven | ABCDEF0123456" 
       ex[1]= "Steven | ABCDEF0123456" 
       //student's value
  
       [studentlist:ex] //send to gsp
  }
  </code></pre>
  
  <p><strong>student.gsp</strong></p>
  
  <pre><code>&lt;g:each in="${studentlist}" status="i" var="stdnt"&gt;
     &lt;tr class="${(i % 2) == 0 ? 'odd' : 'even'}"&gt;
        &lt;td&gt;${stdnt}&lt;/td&gt; //i want this show "Steven"
        &lt;td&gt;${stdnt}&lt;/td&gt; // and this show ABCDEF0123456
     &lt;/tr&gt;
  &lt;/g:each&gt;
  </code></pre>
  
  <p>How can I get the first word and second word?</p>