Class StringUtil
java.lang.Object
org.apache.camel.quarkus.support.debezium.graal.StringUtil
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]Parse a CSV string usingcsvSplit(List, String, int, int)static String[]Parse a CSV string usingcsvSplit(List, String, int, int)Split a quoted comma separated string to a list
-
Constructor Details
-
StringUtil
StringUtil()
-
-
Method Details
-
csvSplit
Parse a CSV string usingcsvSplit(List, String, int, int)- Parameters:
s- The string to parse- Returns:
- An array of parsed values.
-
csvSplit
Parse a CSV string usingcsvSplit(List, String, int, int)- Parameters:
s- The string to parseoff- The offset into the string to start parsinglen- The len in characters to parse- Returns:
- An array of parsed values.
-
csvSplit
Split a quoted comma separated string to a listHandle rfc4180-like CSV strings, with the exceptions:
- quoted values may contain double quotes escaped with back-slash
- Non-quoted values are trimmed of leading trailing white space
- trailing commas are ignored
- double commas result in a empty string value
- Parameters:
list- The Collection to split to (or null to get a new list)s- The string to parseoff- The offset into the string to start parsinglen- The len in characters to parse- Returns:
- list containing the parsed list values
-