title: Splitting string into groups
body: <p>I'm trying to 'group' a string into segments, I guess this example would explain it more succintly</p>
  
  <pre><code>scala&gt; val str: String = "aaaabbcddeeeeeeffg"
  ... (do something)
  res0: List("aaaa","bb","c","dd","eeeee","ff","g")
  </code></pre>
  
  <p>I can thnk of a few ways to do this in an imperative style (with <code>vars</code> and stepping through the string to find groups) but I was wondering if any better functional solution could
   be attained? I've been looking through the Scala API but there doesn't seem to be something that fits my needs.</p>
  
  <p>Any help would be appreciated</p>