echo

Crates.ioecho
lib.rsecho
version0.0.1
sourcesrc
created_at2014-12-10 18:06:01.970682
updated_at2015-12-11 23:58:31.338387
descriptionMacro echo! for println!("{}"...) shorthand
homepage
repositoryhttps://github.com/arthurtw/echo-rs
max_upload_size
id507
size2,878
core (github:salsa-rs:core)

documentation

README

echo

Rust macro echo! and echon! as a shorthand for println!("{}"...) and print!("{}"...).

Usage

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);
}

License

MIT

Commit count: 2

cargo fmt