String function ( String arg0 ) { if ( arg0 == null ) return null ; int loc0 = indexOfExtension ( arg0 ) ; if ( loc0 == - 1 ) return "srini_string" ; else return arg0 . substring ( loc0 + 1 ) ; }
gets the extension of a filename . this method returns the textual part of the filename after the last dot . there must be no directory separator after the dot . foo.txt -- > `` txt '' a/b/c.jpg -- > `` jpg '' a/b . txt/c -- > '' '' a/b/c -- > '' '' the output will be the same irrespective of the machine that the code is running on . concode_field_sep char UNIX_SEPARATOR concode_elem_sep char EXTENSION_SEPARATOR concode_elem_sep char WINDOWS_SEPARATOR concode_field_sep String removeExtension concode_elem_sep int indexOfLastSeparator concode_elem_sep int indexOfExtension