MCPcopy Index your code
hub / github.com/benfry/processing4 / checkExtension

Method checkExtension

core/src/processing/core/PApplet.java:6089–6100  ·  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

6087 * @return an extension, skipping past .gz if it's present
6088 */
6089 static public String checkExtension(String filename) {
6090 // Don't consider the .gz as part of the name, createInput()
6091 // and createOutput() will take care of fixing that up.
6092 if (filename.toLowerCase().endsWith(".gz")) {
6093 filename = filename.substring(0, filename.length() - 3);
6094 }
6095 int dotIndex = filename.lastIndexOf('.');
6096 if (dotIndex != -1) {
6097 return filename.substring(dotIndex + 1).toLowerCase();
6098 }
6099 return null;
6100 }
6101
6102
6103

Callers 1

extensionOptionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected