public abstract class StringUtil extends Object
Strings.| Modifier and Type | Method and Description |
|---|---|
static void |
appendArray(Appendable a,
Object[] array,
String sepString) |
static void |
appendArrayEnquoted(Appendable a,
Object[] array,
String sepString) |
static void |
appendIterable(Appendable a,
Iterable<?> it,
String sepString) |
static void |
appendIterableEnquoted(Appendable a,
Iterable<?> it,
String sepString) |
static void |
appendObject(Appendable a,
Object obj) |
static String |
enquote(String s) |
static void |
enquote(String s,
Appendable a) |
static void |
enquoteIfNecessary(String s,
Appendable a) |
static void |
enquoteIfNecessary(String s,
Appendable a,
Pattern valid) |
static void |
enquoteIfNecessary(String s,
Appendable a,
Pattern valid,
Pattern exception) |
static String |
escapeQuotes(String s)
Escapes double quotes in a string.
|
static void |
escapeQuotes(String s,
Appendable a) |
static Pattern |
getIdentifierPattern() |
static String |
unescapeQuotes(String s)
Unescapes escaped double quotes in a string, i.e.
|
static void |
unescapeQuotes(String s,
Appendable a) |
static String |
unquote(String s) |
static void |
unquote(String s,
Appendable a) |
public static Pattern getIdentifierPattern()
public static void enquote(String s, Appendable a) throws IOException
IOExceptionpublic static void enquoteIfNecessary(String s, Appendable a) throws IOException
IOExceptionpublic static void enquoteIfNecessary(String s, Appendable a, Pattern valid) throws IOException
IOExceptionpublic static void enquoteIfNecessary(String s, Appendable a, Pattern valid, Pattern exception) throws IOException
IOExceptionpublic static void unquote(String s, Appendable a) throws IOException
IOExceptionpublic static String unescapeQuotes(String s)
\" by " and
\\ by \.s - the string in which to unescape double quotes.public static void unescapeQuotes(String s, Appendable a) throws IOException
IOExceptionpublic static String escapeQuotes(String s)
" is
replaced by \" and \ is replaced by
\\.s - the string to escape.public static void escapeQuotes(String s, Appendable a) throws IOException
IOExceptionpublic static void appendObject(Appendable a, Object obj) throws IOException
IOExceptionpublic static void appendArray(Appendable a, Object[] array, String sepString) throws IOException
IOExceptionpublic static void appendArrayEnquoted(Appendable a, Object[] array, String sepString) throws IOException
IOExceptionpublic static void appendIterable(Appendable a, Iterable<?> it, String sepString) throws IOException
IOExceptionpublic static void appendIterableEnquoted(Appendable a, Iterable<?> it, String sepString) throws IOException
IOExceptionCopyright © 2013. All Rights Reserved.