public class CSVString
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELIMITER
The default delimiter.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
replace(java.lang.String original,
java.lang.String search,
java.lang.String replace)
Returns a new string resulting from replacing all occurrences,
of search string in this string with replace string.
|
static java.lang.String |
replace(java.lang.String original,
java.lang.String search,
java.lang.String replace,
boolean all)
Returns a new string resulting from replacing the first occurrence, or all occurrences, of
search string in this string with replace string.
|
static java.lang.String |
replaceEndWith(java.lang.String original,
java.lang.String oldSuffix,
java.lang.String newSuffix)
Returns a new string resulting from replacing the end of this String
from oldSuffix to newSuffix.
|
static java.lang.String |
toCSV(java.lang.String string)
Escape the string as needed using the default delimiter.
|
static java.lang.String |
toCSV(java.lang.String string,
java.lang.String delimiter)
Escape the string as needed using the given delimiter.
|
public static final java.lang.String DELIMITER
public static java.lang.String toCSV(java.lang.String string)
public static java.lang.String toCSV(java.lang.String string, java.lang.String delimiter)
public static java.lang.String replace(java.lang.String original, java.lang.String search, java.lang.String replace, boolean all)
search
- the old stringreplace
- the new stringall
- if true
all occurrences of the search string are replaced; if
false
only the first occurrencesearch
with replace
.public static java.lang.String replace(java.lang.String original, java.lang.String search, java.lang.String replace)
search
- the old stringreplace
- the new stringpublic static java.lang.String replaceEndWith(java.lang.String original, java.lang.String oldSuffix, java.lang.String newSuffix)
oldSuffix
- the old suffixnewSuffix
- the new suffix