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.lang.String compress(java.lang.String data)
           
 java.lang.String deCompress(java.lang.String data)
           
 java.lang.String encodeMD5(java.lang.String key)
           
 java.util.List<java.lang.String> explode(java.lang.String text, java.lang.String exploder)
          Explode a string within a String List using an exploder
static StringUtils getInstance()
           
static void main(java.lang.String[] args)
           
 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<java.lang.String> 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 nothing made, the list contains the original string.

compress

public java.lang.String compress(java.lang.String data)

deCompress

public java.lang.String deCompress(java.lang.String data)

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

encodeMD5

public java.lang.String encodeMD5(java.lang.String key)

main

public static void main(java.lang.String[] args)