fr.tireme.shared
Class StringUtils

java.lang.Object
  extended by fr.tireme.shared.StringUtils

public class StringUtils
extends java.lang.Object

Privates utilities

Since:
2th august 2001
Author:
pierre

Method Summary
 java.util.List explode(java.lang.String text, java.lang.String exploder)
          Explode a string within a String List using an exploder
static StringUtils getInstance()
           
 java.lang.String replace(java.lang.String text, java.lang.String tobe, java.lang.String by)
          Replace within a string a substring by an other one.
 java.lang.String strip(java.lang.String text, java.lang.String stringToBeStripped)
          Remove all occurences of a specific sub string i a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static StringUtils getInstance()
Returns:
The unique instance of this class.

explode

public java.util.List explode(java.lang.String text,
                              java.lang.String exploder)
Explode a string within a String List using an exploder

Parameters:
text - Original string to explode
exploder - String acting to split the string
Returns:
A List of Strings containing all exploded values. If there is nothin made, the list contains the original string.

replace

public java.lang.String replace(java.lang.String text,
                                java.lang.String tobe,
                                java.lang.String by)
Replace within a string a substring by an other one. The replacemnt result comes within a new string

Parameters:
text - string to be change
tobe - text to be replaced
by - replacement text
Returns:
string with replaced values

strip

public java.lang.String strip(java.lang.String text,
                              java.lang.String stringToBeStripped)
Remove all occurences of a specific sub string i a string. The result comes within a new string

Parameters:
text - string to be change
stringToBeStripped - text to be removed
Returns:
string without stripped sub string