Here you can find the source of removeFillers(String str)
public static String removeFillers(String str)
//package com.java2s; /*L//from w ww. jav a2s . c om * Copyright Northrop Grumman Information Technology. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/nci-mapping-tool/LICENSE.txt for details. */ import java.util.*; public class Main { private static Vector filler_vec = null; public static String removeFillers(String str) { String delim = getDelimiters(); return removeFillers(str, delim); } public static String removeFillers(String str, String delim) { Vector fillers = getFillers(); StringTokenizer st = new StringTokenizer(str, delim); int knt = 0; //String retstr = ""; StringBuffer buf = new StringBuffer(); while (st.hasMoreTokens()) { String val = st.nextToken(); if (!fillers.contains(val)) { //retstr = retstr + " " + val; buf.append(" " + val); } } String retstr = buf.toString(); retstr = retstr.trim(); return retstr; } public static String getDelimiters() { return "(-)"; } public static Vector getFillers() { return filler_vec; } }