3 releases
0.1.2 | Jan 29, 2025 |
---|---|
0.1.1 | Jan 29, 2025 |
0.1.0 | Jan 24, 2025 |
#863 in Text processing
398 downloads per month
5KB
prompt-input
A simple and lightweight Rust library for creating user input prompts. The library is designed to simplify input handling in CLI applications, providing a straightforward API to prompt users for input.
Installation
Add prompt-input
to your Cargo.toml
:
cargo add prompt-input
Usage
Here's a quick example of how to use prompt-input
:
use prompt_input::prelude::*;
fn main() {
let name: String = String::prompt("Enter your name: ");
println!("Hello, {}!", name);
}
Why Use prompt-input?
- Reduces boilerplate code for handling user input.
- Encourages clean and readable CLI application code.
- Easy to extend for other types in future versions.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.
lib.rs
:
A simple library that provides functionality to prompt for user input.
The library is designed to simplify user input handling, offering an easy way to display prompts
and capture input without needing to handle Result
or Option
explicitly.