public static String ripExtension(String fileName){
  String retString=null;
  int extStart=fileName.lastIndexOf('.');
  if (extStart == -1)   retString=fileName;
 else   retString=fileName.substring(0,extStart);
  return retString;
}

public static String ripExtension ( String fileName ) { String retString = null ; int extStart = fileName . lastIndexOf ( '.' ) ; if ( extStart == - 1 ) retString = fileName ; else retString = fileName . substring ( 0 , extStart ) ; return retString ; }
strips an extension off of a file ' s filename .
