prompt

abstract fun prompt(prompt: String = DefaultPromptOptions.PROMPT, isPassword: Boolean = DefaultPromptOptions.IS_PASSWORD): String

Prompts the user for input and returns the entered value as a String.

Return

The user-entered input as a String.

Parameters

prompt

The message displayed to the user as a prompt.

isPassword

A flag indicating whether the input should be treated as a password. Default value is false. Clients usually hide passwords from users by displaying the asterisks ("*") instead of the actual password.