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

Method count

regex/bench/src/main.rs:83–104  ·  view source on GitHub ↗
(&self, haystack: &str)

Source from the content-addressed store, hash-verified

81
82impl Args {
83 fn count(&self, haystack: &str) -> usize {
84 let pat = &self.arg_pattern;
85 if self.cmd_onig {
86 count_onig(pat, haystack)
87 } else if self.cmd_pcre1 {
88 count_pcre1(pat, haystack)
89 } else if self.cmd_pcre2 {
90 count_pcre2(pat, haystack)
91 } else if self.cmd_stdcpp {
92 count_stdcpp(pat, haystack)
93 } else if self.cmd_re2 {
94 count_re2(pat, haystack)
95 } else if self.cmd_rust {
96 count_rust(pat, haystack)
97 } else if self.cmd_rust_bytes {
98 count_rust_bytes(pat, haystack)
99 } else if self.cmd_tcl {
100 count_tcl(pat, haystack)
101 } else {
102 panic!("unreachable")
103 }
104 }
105}
106
107macro_rules! nada {

Callers 15

char_len_lossyFunction · 0.80
from_formatterMethod · 0.80
bump_ifMethod · 0.80
span_rangeFunction · 0.80
longest_common_prefixMethod · 0.80
longest_common_suffixMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
count_onigFunction · 0.80
count_pcre1Function · 0.80
count_pcre2Function · 0.80

Calls 8

count_onigFunction · 0.85
count_pcre1Function · 0.85
count_pcre2Function · 0.85
count_stdcppFunction · 0.85
count_re2Function · 0.85
count_rustFunction · 0.85
count_rust_bytesFunction · 0.85
count_tclFunction · 0.85

Tested by

no test coverage detected