input_loop

Crates.ioinput_loop
lib.rsinput_loop
version0.1.3
created_at2025-05-01 17:32:00.426079+00
updated_at2025-05-01 21:51:07.65113+00
descriptionA utility for getting typed input from stdin with validation
homepagehttps://github.com/SalladShooter/input_loop
repositoryhttps://github.com/SalladShooter/input_loop
max_upload_size
id1656577
size8,962
SalladShooter (SalladShooter)

documentation

README

input_loop

A utility for getting typed input from stdin with validation.

Usage

Run this command in your terminal

cargo add input_loop

Then add this to your Cargo.toml:

[dependencies]
input_loop = version = "0.1.3"

Example

use input_loop::input_loop;

fn main() {
    let number: i32 = input_loop("Enter a number: ");
    println!("You entered: {}", number);
}
Commit count: 7

cargo fmt