Skip to main content

prompt_string

Function prompt_string 

Source
pub fn prompt_string(label: &str, default: Option<&str>) -> Result<String>
Expand description

Prompt the user for a string input with an optional default value.

§Arguments

  • label - The prompt label to display
  • default - Optional default value shown in brackets

§Returns

The user’s input, or the default if they pressed Enter