1 2 3 4 5 6 7 8 9 10 11
pub fn read_stdin() -> Option<alloc::string::String> { use std::io::{self, Read}; let mut buffer = String::new(); let mut stdin = io::stdin(); match stdin.read_to_string(&mut buffer) { Ok(_) => Some(buffer), Err(_) => None, } }