split

fun <EachT : Any, ValueT> NullableOption<EachT, ValueT>.split(regex: Regex): OptionWithValues<List<ValueT>?, List<ValueT>, ValueT>

Change to option to take any number of values, separated by a regex.

This must be called after converting the value type, and before other transforms.

Example:

val opt: List<Int>? by option().int().split(Regex(","))

Which can be called like this:

./program --opt 1,2,3

fun <EachT : Any, ValueT> NullableOption<EachT, ValueT>.split(delimiter: String): OptionWithValues<List<ValueT>?, List<ValueT>, ValueT>

Change to option to take any number of values, separated by a string delimiter.

This must be called after converting the value type, and before other transforms.

Example:

val opt: List<Int>? by option().int().split(",")

Which can be called like this:

./program --opt 1,2,3