org.objectweb.jonas_ejb.genic
Class JString
java.lang.Object
|
+--org.objectweb.jonas_ejb.genic.JString
- public class JString
- extends java.lang.Object
This class implements useful methods not already implemented
in the java.lang.String class.
Constructor Summary |
JString(java.lang.String s)
|
Method Summary |
java.lang.String |
replace(java.lang.String sOld,
java.lang.String sNew)
Returns a new string resulting from remplacing all occurrences,
of sOld string in this string with sNew string.
|
java.lang.String |
replace(java.lang.String sOld,
java.lang.String sNew,
boolean all)
Returns a new string resulting from replacing the first occurence, or all occurrences,
of sOld string in this string with sNew string.
|
java.lang.String |
replaceEndWith(java.lang.String oldSuffix,
java.lang.String newSuffix)
Returns a new string resulting from remplacing the end of this String
from oldSuffix to newSuffix.
|
java.lang.String |
toString()
Returns a String object representing this JString's value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JString
public JString(java.lang.String s)
replace
public java.lang.String replace(java.lang.String sOld,
java.lang.String sNew,
boolean all)
- Returns a new string resulting from replacing the first occurence, or all occurrences,
of sOld string in this string with sNew string.
If the string sOld does not occur in the character sequence represented by this object,
then this string is returned.
- Parameters:
sOld
- the old stringsNew
- the new stringall=true
- all occurrences of the sOld string are replacedall=false
- only the first occurrence of the sOld string is replaced- Returns:
- a string derived from this string by replacing the first ocurrence,
or every occurrence of sOld with sNew.
replace
public java.lang.String replace(java.lang.String sOld,
java.lang.String sNew)
- Returns a new string resulting from remplacing all occurrences,
of sOld string in this string with sNew string.
If the string sOld does not occur in the character sequence represented by this object,
then this string is returned.
- Parameters:
sOld
- the old stringsNew
- the new string- Returns:
- a string derived from this string by replacing every occurrence of sOld with sNew.
replaceEndWith
public java.lang.String replaceEndWith(java.lang.String oldSuffix,
java.lang.String newSuffix)
- Returns a new string resulting from remplacing the end of this String
from oldSuffix to newSuffix.
If the value of JString is return in case of it ends not by oldSuffix
- Parameters:
oldSuffix
- the old suffixnewSuffix
- the new suffix- Returns:
- a string derived from this string by replacing the end oldSuffix by newSuffix
toString
public java.lang.String toString()
- Returns a String object representing this JString's value
- Overrides:
toString
in class java.lang.Object