negatable

Makes a non-nullable boolean option negatable with custom prefix.


Makes this nullable boolean option negatable with a custom prefix. Creates an automatic negation option (e.g., --disable-colors for --colors with prefix "disable-").

Parameters

prefix

The prefix to use for negation (default uses the Arguments class default "no-")


@JvmName(name = "negatableNonNull")
fun OptionBuilder<Boolean>.negatable(prefix: String? = null): OptionBuilder<Boolean>(source)

Makes this non-nullable boolean option negatable with a custom prefix. Creates an automatic negation option (e.g., --disable-colors for --colors with prefix "disable-").

Parameters

prefix

The prefix to use for negation (default uses the Arguments class default "no-")