Read one line from stdin, including the trailing newline if present. Returns "" on EOF — callers can disambiguate empty input from EOF only by checking the file descriptor state externally.
import stdlib::io::*;
io_write("name? ");
flush();
let name: string = read_line();
println!("hello,", name.trim());