clikt / com.github.ajalt.clikt.parameters.arguments / transformAll


fun ProcessedArgument.transformAll(nvalues: Int? = null, required: Boolean? = null, transform: ArgCallsTransformer): ProcessedArgument

Transform all values to the final argument type.

The input is a list of values, one for each value on the command line. The values in the list are the output of calls to convert. The input list will have a size of nvalues if nvalues is > 0.

Used to implement functions like pair and multiple.


val entries by argument().transformAll { it.joinToString() }


nvalues - The number of values required by this argument. A negative nvalues indicates a variable number of values.

required - If true, an error with be thrown if no values are provided to this argument.