org.exolab.adaptx.xml
public class Whitespace extends Object
Field Summary | |
---|---|
static char | CR
Carriage Return character
Changed to '\r' instead of '
' to make compatible
with MS J++
Mohan Embar
|
static String | EMPTY
Empty String
|
static char | LF
Linefeed character
|
static char | NULL
Null character
|
static char | SPACE
Single space character
|
static char | TAB
Tab character
|
Method Summary | |
---|---|
static String | stripSpace(String data)
Strips whitespace from the given String.
|
static String | stripSpace(String data, boolean stripAllLeadSpace, boolean stripAllTrailSpace)
Strips whitespace from the given String.
|
static int | stripSpace(char[] data, boolean stripAllLeadSpace, boolean stripAllTrailSpace)
Strips whitespace from the given String.
|
Parameters: data the String to strip whitespace from
Parameters: data the String to strip whitespace from stripAllLeadSpace, a boolean indicating whether or not to strip all leading space. If true all whitespace from the start of the given String will be stripped. If false, all whitespace from the start of the given String will be converted to a single space. stripAllTrailSpace, a boolean indicating whether or not to strip all trailing space. If true all whitespace at the end of the given String will be stripped. If false, all whitespace at the end of the given String will be converted to a single space.
Parameters: data the chars to strip whitespace from stripAllLeadSpace, a boolean indicating whether or not to strip all leading space. If true all whitespace from the start of the given String will be stripped. If false, all whitespace from the start of the given String will be converted to a single space. stripAllTrailSpace, a boolean indicating whether or not to strip all trailing space. If true all whitespace at the end of the given String will be stripped. If false, all whitespace at the end of the given String will be converted to a single space.
Returns: the new length of the array