src/main/java/de/dfki/lt/loot/util/FileUtil.java
public static String stripFileExtension(String fileName) {
    int dotPos = fileName.lastIndexOf('.');
    String diffName =
      (dotPos == -1) ? fileName : fileName.substring(0, dotPos);
    return diffName;
  }
/** remove everything including and beyond the last '.' from fileName*/
remove everything including and beyond the last '.' from fileName
remove everything including and beyond the last ' . ' from fileName
public static String stripFileExtension(String fileName) {
    int dotPos = fileName.lastIndexOf('.');
    String diffName =
      (dotPos == -1) ? fileName : fileName.substring(0, dotPos);
    return diffName;
  }
public static String stripFileExtension ( String fileName ) { int dotPos = fileName . lastIndexOf ( '.' ) ; String diffName = ( dotPos == - 1 ) ? fileName : fileName . substring ( 0 , dotPos ) ; return diffName ; }
remove everything including and beyond the last '.'
remove everything including and beyond the last ' . '