Package org.jibx.runtime
Class WhitespaceConversions
- java.lang.Object
-
- org.jibx.runtime.WhitespaceConversions
-
public final class WhitespaceConversions extends Object
Utilities for handling whitespace options.- Author:
- Dennis M. Sosnoski
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringcollapse(String text)Collapse whitespace in string.static Stringreplace(String text)Replace non-space whitespace in string.static Stringtrim(String text)Trim leading and trailing whitespace in string.
-
-
-
Method Detail
-
replace
public static String replace(String text)
Replace non-space whitespace in string. This first scans to see if any non-space whitespace is present, and if so, invokes the actual conversion handling.- Parameters:
text- value to be converted (nullif none)- Returns:
- replaced string value (
nullif none)
-
collapse
public static String collapse(String text)
Collapse whitespace in string. This first scans to see if any whitespace is present, and if so, invokes the actual conversion handling.- Parameters:
text- value to be converted (nullif none)- Returns:
- collapsed string value (
nullif none)
-
-