public static String [ ] subtract ( final String [ ] input , final String [ ] list ) { final Set < String > difference = new HashSet < String > ( Arrays . asList ( list ) ) ; difference . removeAll ( Arrays . asList ( input ) ) ; return difference . toArray ( new String [ difference . size ( ) ] ) ; }
Subtract one string array from another