public class RegexUtil
extends java.lang.Object
Constructor and Description |
---|
RegexUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
consolidateWhitespaces(java.lang.String source)
Consolidates sequences of tabs and spaces into single spaces.
|
static java.lang.String |
ltrim(java.lang.String s)
Left trim: removes white spaces from the beginning of the given string
|
static java.lang.String |
replaceIgnoreCase(java.lang.String haystack,
java.lang.String needle,
java.lang.String replacement)
Replaces all occurrences of the given needle with the given
replacement within the referenced haystack using case
|
static java.lang.String |
rtrim(java.lang.String s)
Right trim: removes white spaces from the end of the given string
|
public static java.lang.String ltrim(java.lang.String s)
public static java.lang.String rtrim(java.lang.String s)
public static java.lang.String consolidateWhitespaces(java.lang.String source)
public static java.lang.String replaceIgnoreCase(java.lang.String haystack, java.lang.String needle, java.lang.String replacement)
needle
- if null or empty, the replacement operation will return the
original value of the haystackreplacement
- may not be null insensitive REGEX replace