input_loop
A utility for getting typed input from stdin with validation.
Usage
Run this command in your terminal
Then add this to your Cargo.toml:
[]
= version = "0.1.3"
Example
use input_loop;
A utility for getting typed input from stdin with validation.
Run this command in your terminal
cargo add input_loop
Then add this to your Cargo.toml:
[dependencies]
input_loop = version = "0.1.3"
use input_loop::input_loop;
fn main() {
let number: i32 = input_loop("Enter a number: ");
println!("You entered: {}", number);
}