| Crates.io | input_loop |
| lib.rs | input_loop |
| version | 0.1.3 |
| created_at | 2025-05-01 17:32:00.426079+00 |
| updated_at | 2025-05-01 21:51:07.65113+00 |
| description | A utility for getting typed input from stdin with validation |
| homepage | https://github.com/SalladShooter/input_loop |
| repository | https://github.com/SalladShooter/input_loop |
| max_upload_size | |
| id | 1656577 |
| size | 8,962 |
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);
}