Macro find_str

Source
macro_rules! find_str {
    ( $string:expr; $array:expr ) => { ... };
}
Expand description

Returns a bool saying whether the given string contains the specified pattern, expressed as an array of &str. Avoids all heap allocations.

ยงExamples

 
let s = "Come va, amico?";
assert_eq!(contains!(s; ["me", "v", "a, a"]), true);