MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / count_occurrences

Function count_occurrences

atomic-agent/src/record/tests.rs:1069–1071  ·  view source on GitHub ↗
(content: &str, pattern: &str)

Source from the content-addressed store, hash-verified

1067}
1068
1069fn count_occurrences(content: &str, pattern: &str) -> usize {
1070 content.matches(pattern).count()
1071}
1072
1073/// Reproduces the real-world mechanism behind the orphan-view duplication
1074/// bug: a session whose `SessionStart` fork never ran (or failed silently),

Calls 2

countMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected