//read lines from stdin and return a vector
fn readlines() -> Vec<String> {
use std::io::prelude::*;
let stdin = std::io::stdin();
let v = stdin.lock().lines().map(|x| x.unwrap()).collect();
v
}
// sample usage
fn main() {
let f = readlines();
println!("{:?}", f);
}
Code Example |
---|
Rust :: rust swap vector elements |
Rust :: String to int in Rust |
Rust :: host rust server |
Rust :: how to export a macro in rust |
Rust :: actix web |
Rust :: rust struct |
Rust :: rust convert a string (with decimals) to a floating point number. |
Rust :: rust lang start a new project |
Rust :: rust concat |
Rust :: class in rust |
Rust :: rust initialize empty array |
Rust :: rust•armanriazi•concept•semantic |
Rust :: armanriazi•rust•unsafe•extern |
Rust :: rust•armanriazi•iterator•index•avoid |
Rust :: set interval Rust |
Rust :: allow dead code |
Rust :: armanriazi•rust•rc•vs•refcell |
Rust :: armanriazi•rust•trait•blanket |
Rust :: rust•armanriazi•concept•nan |
Lua :: roblox rainbow part |
Lua :: roblox player joined |
Lua :: luau loop all players |
Lua :: roblox random part color |
Lua :: grepper lua |
Lua :: lua type of |
Lua :: lua convert function to string |
Lua :: rhyme api |
Lua :: int and float in lua |
Lua :: lua to float |
Matlab :: matlab measure time |