getSplitValues

fun Headers.getSplitValues(name: String, separator: Char = ',', splitInsideQuotes: Boolean = false): List<String>?(source)

Gets all values associated with the specified header name and splits them using the provided separator.

If splitInsideQuotes is true, the function ignores quotes entirely and splits everywhere the separator appears. Otherwise, separator that occurs inside a double-quoted string isn't treated as a split point.

Report a problem

Parameters

name

The header name.

separator

The character on which to split (e.g., ',' or ';').

splitInsideQuotes

If true, quotes are ignored and splitting occurs at every separator. If false, separators inside quoted strings are not considered split points.