public class TextUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TextUtils.Partial
A partial unescape result
|
| Constructor and Description |
|---|
TextUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
escape(java.lang.String input,
char echar,
char[] special)
Escape the input string using the escape delimiter for the given special chars
|
static java.lang.String |
join(java.lang.String[] input,
char separator)
Join an array of strings with the given separator, without escaping
|
static java.lang.String |
joinEscaped(java.lang.String[] input,
char separator,
char echar,
char[] special)
Join an array of strings with the given separator, escape char, and other special chars for escaping
|
static java.lang.String[] |
splitUnescape(java.lang.String input,
char[] separators,
char echar,
char[] special)
Split the input on the given separator char, and unescape each portion using the escape char and special chars
|
static java.lang.String[] |
splitUnescape(java.lang.String input,
char separator,
char echar,
char[] special)
Split the input on the given separator char, and unescape each portion using the escape char and special chars
|
static java.lang.String |
unescape(java.lang.String input,
char echar,
char[] allowEscaped)
Unescape the input string by removing the escape char for allowed chars
|
static TextUtils.Partial |
unescape(java.lang.String input,
char echar,
char[] allowEscaped,
char[] delimiter)
Unescape the input string by removing the escape char for allowed chars
|
public static java.lang.String escape(java.lang.String input,
char echar,
char[] special)
input - input stringechar - escape charspecial - all chars that should be escaped, the escape char itself will be automatically includedpublic static java.lang.String unescape(java.lang.String input,
char echar,
char[] allowEscaped)
input - input stringechar - escape charallowEscaped - all chars that can be escaped by the escape charpublic static TextUtils.Partial unescape(java.lang.String input, char echar, char[] allowEscaped, char[] delimiter)
input - input stringechar - escape charallowEscaped - all chars that can be escaped by the escape chardelimiter - all chars that indicate parsing should stoppublic static java.lang.String join(java.lang.String[] input,
char separator)
input - input stringseparator - separatorpublic static java.lang.String joinEscaped(java.lang.String[] input,
char separator,
char echar,
char[] special)
input - input stringseparator - separatorechar - escape charspecial - all special chars not necessarily including the echar or separatorpublic static java.lang.String[] splitUnescape(java.lang.String input,
char separator,
char echar,
char[] special)
input - input stringseparator - char separating each componentechar - escape charspecial - chars that are escapedpublic static java.lang.String[] splitUnescape(java.lang.String input,
char[] separators,
char echar,
char[] special)
input - input string with components separated by the the separator charsseparators - chars separating each componentechar - escape charspecial - additional chars that are escaped, does not need to include echar or separators