pub fn print_columns(words: Vec<String>) {
        let stdout = stdout();
        let mut stdout = BufWriter::new(stdout.lock());
        let mut stderr = stderr();

        let terminal_size = termion::terminal_size().unwrap().0 as usize;
        let columned = make_columns(words, terminal_size);
        for i in 0..columned[0].len() {
            for j in 0..columned.len() {
                if i < columned[j].len() {
                    stdout.write(columned[j][i].as_bytes()).try(&mut stderr);
                }
            }
            stdout.write("\n".as_bytes()).try(&mut stderr);
        }
        stdout.flush().try(&mut stderr);
    }
/// Prints a vector of strings in a table-like way to the terminal
Prints a vector of strings in a table-like way to the terminal
Prints a vector of strings in a table - like way to the terminal
pub fn print_columns(words: Vec<String>) {
        let stdout = stdout();
        let mut stdout = BufWriter::new(stdout.lock());
        let mut stderr = stderr();
        let terminal_size = termion::terminal_size().unwrap().0 as usize;
        let columned = make_columns(words, terminal_size);
        for i in 0..columned[0].len() {
            for j in 0..columned.len() {
                if i < columned[j].len() {
                    stdout.write(columned[j][i].as_bytes()).try(&mut stderr);
                }
            }
            stdout.write("\n".as_bytes()).try(&mut stderr);
        }
        stdout.flush().try(&mut stderr);
    }
pub fn print_columns ( words : Vec < String > ) { let stdout = stdout ( ) ; let mut stdout = BufWriter :: new ( stdout . lock ( ) ) ; let mut stderr = stderr ( ) ; let terminal_size = termion :: terminal_size ( ) . unwrap ( ) . 0 as usize ; let columned = make_columns ( words , terminal_size ) ; for i in 0 .. columned [ 0 ] . len ( ) { for j in 0 .. columned . len ( ) { if i < columned [ j ] . len ( ) { stdout . write ( columned [ j ] [ i ] . as_bytes ( ) ) . try ( & mut stderr ) ; } } stdout . write ( " \n " . as_bytes ( ) ) . try ( & mut stderr ) ; } stdout . flush ( ) . try ( & mut stderr ) ; }
Prints a vector of strings in a table-like way to the terminal
Prints a vector of strings in a table - like way to the terminal
words
Vec<String>