public class Strip extends Object
Example1: Strip.Char("..dfld..",'.',Strip.TRAILING) yields "..dlfd."
Example2: Strip.Chars("..dfld..",".",Strip.TRAILING) yields "..dlfd"
Example3: Strip.Chars(". .. dfld. , .","., ",Strip.BOTH) yields "dfld"
| Modifier and Type | Field and Description |
|---|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
static String |
character(String str,
char chr,
int where)
Strip all of the specified character from beginning, end or both.
|
static String |
chars(String str,
String chars,
int where)
Strip multiple characters contained in the set given as second parameter
until a non-set character.
|
static String |
doubleQuote(String str,
int where)
Strip double quotes from beginning, end or both, only once.
|
static void |
main(String[] args)
Test the class
|
static String |
singleQuote(String str,
int where)
Strip single quotes from beginning, end or both, only once.
|
static String |
whitespace(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.
|
public static final int NOTHING
public static final int LEADING
public static final int TRAILING
public static final int BOTH
public static String doubleQuote(String str, int where)
public static String singleQuote(String str, int where)
public static String whitespace(String str, int where)
public static String character(String str, char chr, int where)
public static String chars(String str, String chars, int where)
public static void main(String[] args)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}