Here you can find the source of strip(String[] src, String[] toStrip)
public static String[] strip(String[] src, String[] toStrip)
//package com.java2s; /* ******************************************************************* * Copyright (c) 1999-2000 Xerox Corporation. * All rights reserved. //from www. j a va2s . com * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Xerox/PARC initial implementation * ******************************************************************/ import java.util.List; public class Main { private static final String[] NONE = new String[0]; public static String[] strip(String[] src, String[] toStrip) { if (null == toStrip) { return strip(src, NONE); } else if (null == src) { return strip(NONE, toStrip); } List slist = org.aspectj.util.LangUtil.arrayAsList(src); List tlist = org.aspectj.util.LangUtil.arrayAsList(toStrip); slist.removeAll(tlist); return (String[]) slist.toArray(NONE); } public static List arrayAsList(Object[] ra) { return org.aspectj.util.LangUtil.arrayAsList(ra); } }