title: Java splitting string at index without cutting the word
body: <p>I was just wondering it here is an <code>API</code> or some easy and quick way to split <code>String</code> at given index into <code>String[] array</code> but if there is a word at that index then put it to other String.</p>
  
  <p>So lets say I have a string: <code>"I often used to look out of the window, but I rarely do that anymore"</code></p>
  
  <p>The length of that string is <strong>68</strong> and I have to cut it at <strong>36</strong>, which is in this given sentence <strong>n</strong>, but now it should split the word at <strong>the</strong> so that the array would be <code>["I often used to look out of the", "window, but I rarely do that anymore"]</code>.</p>
  
  <p>And if the new sentence is longer than <strong>36</strong> then it should be split aswell, so if I had a bit longer sentence: <code>"I often used to look out of the window, but I rarely do that anymore, even though I liked it"</code> <br>
  Would be <code>["I often used to look out of the", "window, but I rarely do that anymore", ",even though I liked it"]</code></p>