MCPcopy Index your code
hub / github.com/processing/processing / checkExtension

Method checkExtension

core/src/processing/core/PApplet.java:6871–6882  ·  view source on GitHub ↗

Get the compression-free extension for this filename. @param filename The filename to check @return an extension, skipping past .gz if it's present

(String filename)

Source from the content-addressed store, hash-verified

6869 * @return an extension, skipping past .gz if it's present
6870 */
6871 static public String checkExtension(String filename) {
6872 // Don't consider the .gz as part of the name, createInput()
6873 // and createOuput() will take care of fixing that up.
6874 if (filename.toLowerCase().endsWith(".gz")) {
6875 filename = filename.substring(0, filename.length() - 3);
6876 }
6877 int dotIndex = filename.lastIndexOf('.');
6878 if (dotIndex != -1) {
6879 return filename.substring(dotIndex + 1).toLowerCase();
6880 }
6881 return null;
6882 }
6883
6884
6885

Callers 1

extensionOptionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected