Skip to main content

contains_any

Function contains_any 

Source
pub fn contains_any<Needles>(haystack: &str, needles: Needles) -> bool
where Needles: IntoIterator, Needles::Item: AsRef<str>,
Expand description

Reports whether haystack contains any of the non-empty needles.

An empty needle is skipped rather than matching every haystack, so an empty list or a list of empty strings matches nothing.