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

Function count_occurrences

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

Source from the content-addressed store, hash-verified

1033}
1034
1035fn count_occurrences(content: &str, pattern: &str) -> usize {
1036 content.matches(pattern).count()
1037}
1038
1039/// Reproduces the real-world mechanism behind the orphan-view duplication
1040/// 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