All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.akhikhl.unpuzzle.eclipse2maven.Utils.groovy Maven / Gradle / Ivy

There is a newer version: 0.0.21
Show newest version
/*
 * unpuzzle
 *
 * Copyright 2014  Andrey Hihlovskiy.
 *
 * See the file "LICENSE" for copying and usage permission.
 */
package org.akhikhl.unpuzzle.eclipse2maven

/**
 * Various utility functions.
 * @author akhikhl
 */
final class Utils {

  static String getArchiveNameNoExt(String fileName) {
    if(fileName)
      for(String ext in [ '.tar.gz', '.gz', '.tar', '.zip' ])
        if(fileName.endsWith(ext))
          return fileName.substring(0, fileName.length() - ext.length());
    return fileName
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy