Console Utilities
A Rust crate for handling console input and output utilities.
Usage
[]
= "1"
Once you have the dependency you can import it in your project:
use ;
Examples
User Input
use ;
// Prompt for user input
let user_input: String = input;
// Prompt for user input (colored)
let colored_user_input: String = input_rgb;
// Prompt for user input (gradient)
let gradient_user_input: String = input_gradient;
println!;
Console Output
use ;
use RGB;
// Print text in a specific color
print_rgb;
// Print text with a gradient
print_gradient;
Color Utilities
use ;
// Define a custom RGB variable
let color_variable: RGB = RGB new;
// Set text color
set_text_color;
println!;
println!;
// Reset text color
reset_text_color;
Cursor Utilties
use ;
// Show and hide cursor
show_cursor;
hide_cursor;
// Move cursor
cursor_up;
cursor_down;
cursor_left;
cursor_right;
Console Utilties
use ;
// Flush the console
flush_console;
// Clear the current line
clear_line;
// Clear multiple lines
clear_lines;