| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final char | |
| private static final int | EOS
Internal constant used to denote END-OF-STRING |
| private static final char | |
| pack-priv static String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static String | |
| public static boolean | |
| public static boolean | equalEncodings(String str1, String str2)
Method that implements a loose String compairon for encoding Strings. |
| public static String | |
| public static boolean | |
| public static boolean | |
| public static final boolean | isSpace(char c)
Note that it is assumed that any "weird" white space (xml 1.1 LSEP and NEL) have been replaced by canonical alternatives (linefeed for element content, regular space for attributes) |
| public static boolean | |
| public static String | Returns: Normalized String, if any white space was removed or normalized; null if no changes were necessary.Buffer that contains the String to check buf, int Offset of the first character of the text to check
in the buffer origStart, int Offset of the character following the last character
of the text (as per usual Java API convention) origEnd)Method that will check character array passed, and remove all "extra" spaces (leading and trailing space), and normalize other white space (more than one consequtive space character replaced with a single space). |
| public static String | trimEncoding(String str, boolean upperCase)
Method that will remove all non-alphanumeric characters, and optionally upper-case included letters, from the given String. |
| CHAR_SPACE | back to summary |
|---|---|
| pack-priv static final char CHAR_SPACE | |
| EOS | back to summary |
|---|---|
| private static final int EOS Internal constant used to denote END-OF-STRING | |
| INT_SPACE | back to summary |
|---|---|
| private static final char INT_SPACE | |
| sLF | back to summary |
|---|---|
| pack-priv static String sLF | |
| StringUtil | back to summary |
|---|---|
| public StringUtil() | |
| appendLF | back to summary |
|---|---|
| public static void appendLF(StringBuilder sb) | |
| concatEntries | back to summary |
|---|---|
| public static String concatEntries(Collection<?> coll, String sep, String lastSep) | |
| encodingStartsWith | back to summary |
|---|---|
| public static boolean encodingStartsWith(String enc, String prefix) | |
| equalEncodings | back to summary |
|---|---|
| public static boolean equalEncodings(String str1, String str2) Method that implements a loose String compairon for encoding
Strings. It will work like | |
| getLF | back to summary |
|---|---|
| public static String getLF() | |
| isAllWhitespace | back to summary |
|---|---|
| public static boolean isAllWhitespace(String str) | |
| isAllWhitespace | back to summary |
|---|---|
| public static boolean isAllWhitespace(char[] ch, int start, int len) | |
| isSpace | back to summary |
|---|---|
| public static final boolean isSpace(char c) Note that it is assumed that any "weird" white space (xml 1.1 LSEP and NEL) have been replaced by canonical alternatives (linefeed for element content, regular space for attributes)
| |
| matches | back to summary |
|---|---|
| public static boolean matches(String str, char[] cbuf, int offset, int len) | |
| normalizeSpaces | back to summary |
|---|---|
| public static String normalizeSpaces(char[] buf, int origStart, int origEnd) Method that will check character array passed, and remove all "extra" spaces (leading and trailing space), and normalize other white space (more than one consequtive space character replaced with a single space). Note we only remove explicit space characters (char code 0x0020); the reason being that other white space must have come from non-normalizable sources, ie. via entity expansion, and is thus not to be normalized
| |
| trimEncoding | back to summary |
|---|---|
| public static String trimEncoding(String str, boolean upperCase) Method that will remove all non-alphanumeric characters, and optionally upper-case included letters, from the given String. | |