clikt / com.github.ajalt.clikt.parameters.options / split

split

fun Any, ValueT> NullableOption.split(regex: Regex): OptionWithValues<List?, List, 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:

``` kotlin val opt: List? by option().int().split(Regex(“,”))

Which can be called like this:

./program –opt 1,2,3

fun Any, ValueT> NullableOption.split(delimiter: String): OptionWithValues<List?, List, 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:

``` kotlin val opt: List? by option().int().split(Regex(“,”))

Which can be called like this:

./program –opt 1,2,3