title: Grails make upper case each word in the line
body: <p>I want to make in a line each word first character as upper case and remaning character as lower case. the following code prints same as orginal string. how can make this to work?</p>
  
  <pre><code>def name = "hello world grails"
  
          println  name.split(" +").each{
               it[0]?.toUpperCase()+it[1..-1]?.toLowerCase()
          }
  </code></pre>