main::helpers::command_lines

Function get_user_response

source
pub fn get_user_response(question: &str) -> String
Expand description

Prompts the user with a question and retrieves their response.

§Arguments

  • question - The question to ask the user.

§Returns

This function returns a String representing the user’s input after trimming whitespace.

§Example

let response = get_user_response("What is your name?");