terminal_tools_plus_plus 0.2.3

A collection of enhanced utilities for terminal manipulation and CLI development in Rust.
Documentation
use colored::*;
use std::io::{self, Write};
use crate::terminal::tokenizer::Tokenizer;

/// Prompts the user for input and returns the trimmed result.
pub fn get_input(prompt: &str) -> String {
    print!("{} ", prompt.bright_white().italic());
    let _ = io::stdout().flush();

    let mut input = String::new();
    if io::stdin().read_line(&mut input).is_err() {
        return String::new();
    }

    input.trim().to_string()
}

/// Prompts the user for input and returns the result split into clean tokens.
/// 
/// Useful for building CLI shells or parsing multi-argument commands.
pub fn get_input_tokens(prompt: &str) -> Vec<String> {
    let raw_input = get_input(prompt);
    Tokenizer::tokenize(&raw_input)
}