Macro obfstr::position[][src]

macro_rules! position {
    ($haystack:expr, $needle:expr) => { ... };
}

Finds the position of the needle in the haystack at compiletime.

Produces a const-eval error if the needle is not a substring of the haystack.

assert_eq!(obfstr::position!("haystack", "st"), 3..5);