title: Splitting a string in the middle of a words issue
body: <p>I have automated some flow of filling in a form from a website by taking the fields data from a csv.</p>
  
  <p>Now, for the address there are 3 fields in the form:</p>
  
  <p>Address 1 ____________</p>
  
  <p>Address 2 ____________</p>
  
  <p>Address 3 ____________</p>
  
  <p>Each field have a limit of 35 characters, so whenever I get to 35 characters im continuing the address string in the second address field...</p>
  
  <p>Now, the issue is that my current solution will split it but it will cut the word if it got to 35 chars, for instant, if the word 'barcelona' in the str and 'o' is the 35th char so in the address 2 will be 'na'.</p>
  
  <p>in that case I want to identify if the 35th char is a middle of a word and take the whole word to the next field.</p>
  
  <p>this is my current solution:</p>
  
  <pre><code>private def enterAddress(purchaseInfo: PurchaseInfo) = {
  
      val webElements = driver.findElements(By.className("address")).toList
      val strings = purchaseInfo.supplierAddress.grouped(35).toList
      strings.zip(webElements).foreach{
        case (text, webElement) =&gt; webElement.sendKeys(text)
      }
    }
  </code></pre>
  
  <p>I would appreciate some help here, preferably with Scala but java will be fine as well :) </p>
  
  <p>thanks allot!</p>