menu

Creates a menu from a Range of strings.

It will require that a number is selected within the number of options.

If the the return type is a string, the string in the options parameter will be returned.

T
menu
(
T = ElementType!(Range)
Range
)
(
string question
,
Range options
)
if (
(
is(T == ElementType!(Range)) ||
is(T == int)
)
&&
isForwardRange!(Range)
)

Throws

NoInputException if the user wants to quit.

Meta