input_loop 0.1.3

A utility for getting typed input from stdin with validation
Documentation
1
2
3
4
5
6
7
8
9
10
mod lib;
use lib::input_loop;

fn main() {
    // Example usage
    let number: i32 = input_loop("Enter a number: ");
    println!("You entered: {}", number);
    let float: f64 = input_loop("Enter a decimal: ");
    println!("You entered: {}", float);
}