Macro io_prompt_prototype::promptln [−][src]
macro_rules! promptln { ($($arg:tt)*) => { ... }; }
Expand description
Prints to the standard output, with a newline. Then reads a line of input.
This is a shorthand for calling println!
, read_line
, and removing
any trailing newlines from the output.
Examples
use io_prompt_prototype::promptln; let num: u16 = promptln!("What's your favorite number? >").parse()?; println!("Oh, cool: {}!", num);