public static String pathInfo ( String pathSpec , String path ) { char c = pathSpec . charAt ( 0 ) ; if ( c == ' ' ) { if ( pathSpec . length ( ) == 1 ) return null ; if ( pathSpec . equals ( path ) ) return null ; if ( pathSpec . endsWith ( "/*" ) && pathSpec . regionMatches ( 0 , path , 0 , pathSpec . length ( ) - 2 ) ) { if ( path . length ( ) == pathSpec . length ( ) - 2 ) return null ; return path . substring ( pathSpec . length ( ) - 2 ) ; } } return null ; }
Return the portion of a path that is after a path spec .