| Crates.io | echo |
| lib.rs | echo |
| version | 0.0.1 |
| created_at | 2014-12-10 18:06:01.970682+00 |
| updated_at | 2015-12-11 23:58:31.338387+00 |
| description | Macro echo! for println!("{}"...) shorthand |
| homepage | |
| repository | https://github.com/arthurtw/echo-rs |
| max_upload_size | |
| id | 507 |
| size | 2,878 |
Rust macro echo! and echon! as a shorthand for println!("{}"...) and print!("{}"...).
To use this library, add the following to your Cargo.toml file:
[dependencies]
echo = "*"
You can then use macro echo! and echon! to print space-separated values
with or without newline, similar to Linux echo and echo -n commands.
#![feature(phase)]
#[phase(plugin)] extern crate echo;
fn main() {
let a = 0u;
let b = vec![2i, 4, 6];
// 0 [2, 4, 6] true
echo!(a, b, true);
// 0 (without newline)
echon!(a);
}
MIT