|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.remote.Strip
Class to strip characters from the beginning and end of strings.
Example1: Strip.Char("..dfld..",'.',Strip.TRAILING) yields "..dlfd."
Example2: Strip.Chars("..dfld..",".",Strip.TRAILING) yields "..dlfd"
Example3: Strip.Chars(". .. dfld. , .","., ",Strip.BOTH) yields "dfld"
| Field Summary | |
static int |
BOTH
Strip both, characters at begin and end of string are checked |
static int |
LEADING
Strip leading, only characters at begin of string are checked |
static int |
NOTHING
Strip nothing, a rather ineffecient form of a copy |
static int |
TRAILING
Strip trailing, only characters at end of string are checked |
| Constructor Summary | |
Strip()
|
|
| Method Summary | |
static java.lang.String |
Char(java.lang.String str,
char chr,
int where)
Strip one character from beginning, end or both. |
static java.lang.String |
Chars(java.lang.String str,
java.lang.String chars,
int where)
Strip multiple characters contained in the set given as second parameter until a non-set character. |
static java.lang.String |
DoubleQuote(java.lang.String str,
int where)
Strip double quotes from beginning, end or both, only once. |
static void |
main(java.lang.String[] args)
Test the class |
static java.lang.String |
SingleQuote(java.lang.String str,
int where)
Strip single quotes from beginning, end or both, only once. |
static java.lang.String |
Whitespace(java.lang.String str,
int where)
Strip multiple whitespace characters from beginning, end or both, that means keep on stripping util a non-whitespace character is found. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NOTHING
public static final int LEADING
public static final int TRAILING
public static final int BOTH
| Constructor Detail |
public Strip()
| Method Detail |
public static java.lang.String DoubleQuote(java.lang.String str,
int where)
public static java.lang.String SingleQuote(java.lang.String str,
int where)
public static java.lang.String Whitespace(java.lang.String str,
int where)
public static java.lang.String Char(java.lang.String str,
char chr,
int where)
public static java.lang.String Chars(java.lang.String str,
java.lang.String chars,
int where)
public static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||