com.ctc.wstx.util
Class StringUtil
java.lang.Object
com.ctc.wstx.util.StringUtil
- public final class StringUtil
- extends java.lang.Object
|
Method Summary |
static void |
appendLF(java.lang.StringBuffer sb)
|
static java.lang.String |
concatEntries(java.util.Collection coll,
java.lang.String sep,
java.lang.String lastSep)
|
static boolean |
encodingStartsWith(java.lang.String enc,
java.lang.String prefix)
|
static boolean |
equalEncodings(java.lang.String str1,
java.lang.String str2)
Method that implements a loose String compairon for encoding
Strings. |
static java.lang.String |
getLF()
|
static boolean |
isAllWhitespace(char[] ch,
int start,
int len)
|
static boolean |
isAllWhitespace(java.lang.String str)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
normalizeSpaces(char[] buf,
int origStart,
int origEnd)
Method that will check character array passed, and remove all
"extra" spaces (leading and trailing white space), and normalize
other white space (more than one consequtive space character
replaced with a single space). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringUtil
public StringUtil()
getLF
public static java.lang.String getLF()
appendLF
public static void appendLF(java.lang.StringBuffer sb)
concatEntries
public static java.lang.String concatEntries(java.util.Collection coll,
java.lang.String sep,
java.lang.String lastSep)
normalizeSpaces
public static java.lang.String normalizeSpaces(char[] buf,
int origStart,
int origEnd)
- Method that will check character array passed, and remove all
"extra" spaces (leading and trailing white space), and normalize
other white space (more than one consequtive space character
replaced with a single space).
- Parameters:
buf - Buffer that contains the String to checkorigStart - Offset of the first character of the text to check
in the bufferorigEnd - Offset of the character following the last character
of the text (as per usual Java API convention)
- Returns:
- Normalized String, if any white space was removed or
normalized; null if no changes were necessary.
isAllWhitespace
public static boolean isAllWhitespace(java.lang.String str)
isAllWhitespace
public static boolean isAllWhitespace(char[] ch,
int start,
int len)
equalEncodings
public static boolean equalEncodings(java.lang.String str1,
java.lang.String str2)
- Method that implements a loose String compairon for encoding
Strings. It will work like
String.equalsIgnoreCase(java.lang.String),
except that it will also ignore all hyphen, underscore and
space characters.
encodingStartsWith
public static boolean encodingStartsWith(java.lang.String enc,
java.lang.String prefix)
main
public static void main(java.lang.String[] args)