Macro rust_assembler::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);