Lvg Java
2012 Version

gov.nih.nlm.nls.lvg.Util
Class Strip

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Util.Strip

public class Strip
extends java.lang.Object

This class strip strings and words from a given string.

History:

Version:
V-2012
Author:
NLM NLS Development Team

Constructor Summary
Strip()
           
 
Method Summary
static void main(java.lang.String[] args)
          Test driver for using this class
static java.lang.String StripString(java.lang.String inStr, java.lang.String str, boolean caseSensitive)
          Strip substrings from a given string.
static java.lang.String StripStrings(java.lang.String inStr, java.util.Vector<java.lang.String> strList, boolean caseSensitive)
          Strip substrings from a given string.
static java.lang.String StripWords(java.lang.String inStr, java.util.Vector<java.lang.String> wordList, boolean caseSensitive)
          Strip words from a given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strip

public Strip()
Method Detail

StripStrings

public static java.lang.String StripStrings(java.lang.String inStr,
                                            java.util.Vector<java.lang.String> strList,
                                            boolean caseSensitive)
Strip substrings from a given string. A list of string is given for stripping.

Parameters:
inStr - string to be stripped
strList - a string list. All substrings in inStr that match any element in this list will be stripped.
caseSensitive - true or false for case snesitive or insensitive match for stripping
Returns:
a string after being stripped

StripString

public static java.lang.String StripString(java.lang.String inStr,
                                           java.lang.String str,
                                           boolean caseSensitive)
Strip substrings from a given string. A string is given for stripping.

Parameters:
inStr - string to be stripped
str - a string. All substrings in inStr that match str will be stripped.
caseSensitive - true or false for case snesitive or insensitive match for stripping
Returns:
a string after being stripped

StripWords

public static java.lang.String StripWords(java.lang.String inStr,
                                          java.util.Vector<java.lang.String> wordList,
                                          boolean caseSensitive)
Strip words from a given string. A list of word is given for stripping.

Parameters:
inStr - string to be stripped
wordList - a word list. All words in inStr that match any element in this list will be stripped.
caseSensitive - true or false for case snesitive or insensitive match for stripping
Returns:
a string after being stripped

main

public static void main(java.lang.String[] args)
Test driver for using this class


Lvg Java
2012 Version

Submit a bug or feature

Copyright © 2012 National Library of Medicine