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

Function count_occurrences

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

Source from the content-addressed store, hash-verified

1038}
1039
1040fn count_occurrences(content: &str, pattern: &str) -> usize {
1041 content.matches(pattern).count()
1042}
1043
1044/// Reproduces the real-world mechanism behind the orphan-view duplication
1045/// 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