title: How to split a string in Android according to a given condition?
body: <p>I have a string, <code>12-512-2-15-487-9-98</code> and I want to split into two strings such below:</p>
  
  <pre><code>str1="12-512-2";
  str2="15-487-9-98";
  </code></pre>
  
  <p>That means the first string will contain the characters before third <code>-</code>, and the second string will contain the remaining characters after that. </p>
  
  <p>How can I do this?
  I tried that by using <code>split("-")</code> and concat <code>str[0]+"-"+str[1]+"-"+str[2]</code>
  but I want easier answer.</p>