question: public static String parseSegmentName ( String filename ) { int idx = indexOfSegmentName ( filename ) ; if ( idx != - 1 ) { filename = filename . substring ( 0 , idx ) ; } return filename ; }
target:  Parses the segment name out of the given file name.