title: Java equivalent of python's String partition
body: <p>Java's string split(regex) function splits at all instances of the regex.  Python's partition function only splits at the first instance of the given separator, and returns a tuple of {left,separator,right}.</p>
  
  <p>How do I achieve what partition does in Java?</p>
  
  <p>e.g.</p>
  
  <pre><code>"foo bar hello world".partition(" ")
  </code></pre>
  
  <p>should become</p>
  
  <pre><code>"foo", " ", "bar hello world"
  </code></pre>
  
  <ul>
  <li><p>Is there an external library which
  provides this utility already?</p></li>
  <li><p>how would I achieve it without
  an external library?</p></li>
  <li><p>And can it be achieved without an external library and without Regex?</p></li>
  </ul>
  
  <p>NB. I'm not looking for split(" ",2) as it doesn't return the separator character.</p>