Macro scan_rules::let_readln
[−]
[src]
macro_rules! let_readln { ($($pattern:tt)*) => { ... }; }
Reads a line of text from standard input, then scans it using the specified pattern. All values are bound directly to local variables.
Note that this macro only supports a single pattern.
See also: Pattern Syntax, scan!
.
Examples
let_readln!((let cost: u32, "¥,", let product: Word)); println!("One {} costs {}¥.", product, cost);
Panics
Panics if an error is encountered while reading from standard input, or if the pattern fails to match.