text-input

Crates.iotext-input
lib.rstext-input
version0.1.2
sourcesrc
created_at2024-11-12 03:42:51.41348
updated_at2024-11-12 04:11:54.188321
descriptionA simple library for interactive text input in the terminal
homepage
repositoryhttps://github.com/Ricardo7c/text-input
max_upload_size
id1444510
size3,169
Ricardo Silva (Ricardo7c)

documentation

https://github.com/Ricardo7c/text-input/blob/main/README.md

README

Text input library

A simple library for interactive text input in the terminal. It displays a message to the user and captures input synchronously, returning the entered text as a String (with spaces and line breaks removed). Ideal for CLI applications in Rust that need direct and clean user input.

Example:

use text_input::text;

fn main() {
    let name = text("What's your name? ");
    print!("Hi, {}", name);
}
$ cargo run

What's your name? Rust
Hi, Rust
Commit count: 11

cargo fmt