List of utility methods to do File Extension Name Get
String | getFileExtension(String fullFilename, Boolean withDot) get File Extension String ext = fullFilename.substring(fullFilename.lastIndexOf(".") + (withDot ? 0 : 1), fullFilename.length()); return ext.toUpperCase(); |
String | getFileExtensionOnly(String filename) get File Extension Only String extension = filename.substring( (filename.lastIndexOf(".") + 1), filename.length()); return extension; |