public class TextLib
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
convertToCSVValue(java.lang.String value,
java.lang.String valueSeparator)
Convert a value to CSV format according to RFC 4180.
|
static java.lang.String |
convertValuesToCSVLine(java.util.ArrayList<java.lang.String> values,
java.lang.String valueSeparator,
boolean addLineTerminator)
Convert multiple values to a CVS formatted line according to RFC 4180.
|
static java.lang.String |
encloseAndEscapeValue(java.lang.String value,
java.lang.String encloseChar)
Enclose a value at the start and the end with a char and escape special value chars.
|
public static java.lang.String encloseAndEscapeValue(java.lang.String value,
java.lang.String encloseChar)
value - the value to enclose and escapeencloseChar - the enclose char (typically a quote or a double quote)public static java.lang.String convertToCSVValue(java.lang.String value,
java.lang.String valueSeparator)
value - the value to convertvalueSeparator - the separator (delimiter) between the values (for example ',' or ';')public static java.lang.String convertValuesToCSVLine(java.util.ArrayList<java.lang.String> values,
java.lang.String valueSeparator,
boolean addLineTerminator)
values - the values to convertvalueSeparator - the separator (delimiter) between the values (for example ',' or ';')addLineTerminator - if true add a line terminator at end of the line