public final class StringQuoteHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
doubleQuote(String text)
Returns the text wrapped double quotes
|
static String |
quote(String text,
String quote)
Wraps the text in the given quote text
|
static String |
singleQuote(String text)
Returns the text wrapped single quotes
|
static String[] |
splitSafeQuote(String input,
char separator)
Splits the input safely honoring if values is enclosed in quotes.
|
static String[] |
splitSafeQuote(String input,
char separator,
boolean trim)
Splits the input safely honoring if values is enclosed in quotes.
|
public static String doubleQuote(String text)
public static String singleQuote(String text)
public static String quote(String text, String quote)
text
- the text to wrap in quotesquote
- the quote text added to the prefix and postfix of the textpublic static String[] splitSafeQuote(String input, char separator)
input
- the inputseparator
- the separator char to split the input, for example a comma.public static String[] splitSafeQuote(String input, char separator, boolean trim)
input
- the inputseparator
- the separator char to split the input, for example a comma.trim
- whether to trim each splitted valueApache Camel