title: In java how to get substring from a string till a character c?
body: <p>I have a string (which is basically a file name following a naming convention) <code>abc.def.ghi</code></p>
  
  <p>I would like to extract the substring before the first <code>.</code> (ie a dot)</p>
  
  <p>In java doc api, I can't seem to find a method in String which does that.<br>
  Am I missing something? How to do it?</p>