/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
tmpFile.getName(); int whereDot = tmpFile.getName().lastIndexOf('.'); if (0 < whereDot && whereDot <= tmpFile.getName().length() - 2 ) { return tmpFile.getName().substring(0, whereDot); //extension = filename.substring(whereDot+1); } return ""; }