quick_io

Crates.ioquick_io
lib.rsquick_io
version2.0.0
sourcesrc
created_at2022-09-18 03:37:23.247741
updated_at2022-10-23 03:53:02.262104
descriptionA simple crate to facilitate input and output within programs, with a set of macros.
homepage
repositoryhttps://git.whodiduexpect.com/placeholder/quick-io
max_upload_size
id668476
size6,358
placeholder (alp1ne-0)

documentation

https://docs.rs/quick_io/latest/quick_io/

README

A simple crate to facilitate input and output within programs, with a set of macros. Example:

use quick_io::*;
use std::io::Write;

clear!();
addstr!("Input something: ");

addln!("You typed: {}.", getstr!());

getstr!();

down!(10);
right!(20);
addstr!("Went down 10 characters and right 20 characters"); 

getstr!();

addstr!(0, 10, "Moved to 0, 10 within addstr!");

getstr!(); 

mv!(0, 20);
addstr!("Moved to 0, 20 with mv!");

getstr!();

down!(20);
addln!("Press enter to clear this line.");

getstr!();

line_up!(2);
clear_line!();
line_down!(2);

addln!("Press enter to clear the entire screen.");

getstr!();

clear!();

Copypaste this into a main.rs for a demonstration of the crate (rust playground doesn't support input for some reason?) Note: Since this uses ANSI escape codes for clear!(), mv!(), etc. it may not work on some terminals/systems.

Commit count: 0

cargo fmt