Package de.uplanet.lucy.util
Class TextUtil
java.lang.Object
de.uplanet.lucy.util.TextUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
listToString
(Collection<String> p_list) Serializes a list of strings to a string using"|"
as delimiter and"0"
as escape character.static String
listToString
(Collection<String> p_list, String p_strDel, String p_strEsc) Serializes a list of strings to a string.static LinkedList
<String> stringToList
(String p_str) Deserialize a list of strings that was previously serialized with"|"
as delimiter and"0"
as escape character.static LinkedList
<String> stringToList
(String p_str, String p_strDel, String p_strEsc) Deserialize an array that was previously serialized usingTextUtil#listToString(Collection, String, String)
.
-
Method Details
-
listToString
Serializes a list of strings to a string using"|"
as delimiter and"0"
as escape character.Note that
stringToList
andlistToString
are inverse functions.- Parameters:
p_list
- The list to serialize.- Returns:
- The serialized array list.
-
listToString
Serializes a list of strings to a string.Note that
stringToList
andlistToString
are inverse functions.- Parameters:
p_list
- The list to serialize.p_strDel
- The delimiter sequence to use.p_strEsc
- The escape sequence to use.- Returns:
- The serialized array list.
-
stringToList
Deserialize a list of strings that was previously serialized with"|"
as delimiter and"0"
as escape character.Note that
stringToList
andlistToString
are inverse functions.- Parameters:
p_str
- The string containing the serialized array.- Returns:
- The deserialized array, or an empty list, if the given input is
null
, or empty.
-
stringToList
Deserialize an array that was previously serialized usingTextUtil#listToString(Collection, String, String)
.Note that
stringToList
andlistToString
are inverse functions.- Parameters:
p_str
- The string containing the serialized array.p_strDel
- The delimiter sequence to use.p_strEsc
- The escape sequence to use.- Returns:
- The deserialized array, or an empty list, if the given input is
null
, or empty.
-