macro_rules! count_args {
() => { ... };
( $arg:expr ) => { ... };
( $arg:expr, $( $rest:expr ),* ) => { ... };
}Expand description
Counts the number of args passed to this macro invocation.
Returns the count as usize.
ยงExamples
#[macro_use] extern crate colmac;
assert_eq!(0, count_args!());
assert_eq!(1, count_args!("one"));
assert_eq!(3, count_args!("one", "two", "three"));