MCPcopy Create free account
hub / github.com/davidblewett/rure-python / count_pcre2

Function count_pcre2

regex/bench/src/main.rs:133–136  ·  view source on GitHub ↗
(pat: &str, haystack: &str)

Source from the content-addressed store, hash-verified

131nada!("re-pcre2", count_pcre2);
132#[cfg(feature = "re-pcre2")]
133fn count_pcre2(pat: &str, haystack: &str) -> usize {
134 use ffi::pcre2::Regex;
135 Regex::new(pat).unwrap().find_iter(haystack).count()
136}
137
138#[cfg(not(any(
139 feature = "re-stdcpp",

Callers 1

countMethod · 0.85

Calls 3

countMethod · 0.80
unwrapMethod · 0.80
find_iterMethod · 0.45

Tested by

no test coverage detected