title: java separate string on first line break
body: <p>Is there any efficiency way to separate a string into two when detecting the first line break in the String</p>
  
  <p>for example, the String like this:</p>
  
  <pre><code>String str = "line 1\n"+
               "line 2\n"+
               "line 3\n";
  </code></pre>
  
  <p>so what i want to do just separate "line 1" from the string, and the rest as another string, so finally the result as below:</p>
  
  <pre><code>string1 = "line 1";
  string2 = "line 2\n"+
            "line 3\n";
  </code></pre>