question: protected String cutExtension ( String name ) { int idx = name . lastIndexOf ( '.' ) ; if ( idx >= 0 ) { return name . substring ( 0 , idx ) ; } else { return name ; } }
target:  Returns a filename without its extension.