[][src]Macro numas::s

macro_rules! s {
    ($start:expr, $step:expr, $end:expr) => { ... };
    ($start:expr, $step:expr,) => { ... };
    ($start:expr, $end:expr) => { ... };
    (,$step:expr, $end:expr) => { ... };
    ($start:expr) => { ... };
    ($start:expr,) => { ... };
    (,$end:expr) => { ... };
}

Returns tuple of start, step and end index

Examples

let example = s![2,4,5]; // Returns tuple of (2, 4, 5)

assert(s![1, 5], (1, 1, 5));
assert(s![, 5], (0, 1, 5));
assert(s![2, 4, 5], (2, 4, 5));