title: How to split string into equal-length substrings?
body: <p>Im looking for an <em>elegant</em> way in <a href="http://www.scala-lang.org/" rel="noreferrer">Scala</a> to split a given string into substrings of fixed size (the last string in the sequence might be shorter).</p>
  
  <p>So</p>
  
  <pre><code>split("Thequickbrownfoxjumps", 4)
  </code></pre>
  
  <p>should yield</p>
  
  <pre><code>["Theq","uick","brow","nfox","jump","s"]
  </code></pre>
  
  <p>Of course I could simply use a loop but there has to be a more elegant (functional style) solution.</p>