question: private static boolean matches ( String arg , String p ) { if ( p . endsWith ( " " ) ) { return arg . equals ( p . substring ( 0 , p . length ( ) - 1 ) ) || arg . startsWith ( p ) ; } if ( p . endsWith ( "$" ) ) { return arg . equals ( p . substring ( 0 , p . length ( ) - 1 ) ) ; } return arg . startsWith ( p ) ; }
target:  Does the argument match the prefix?