home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Read STDIN in Rust

August 2023
Code
use std::io;

fn main() -> io::Result<()> {
    let stdin = io::read_to_string(io::stdin())?;
    println!("Stdin was:");
    println!("{stdin}");
    Ok(())
}
═══ § ═══