MCPcopy Create free account
hub / github.com/coder/coder / runeFrequency

Function runeFrequency

agent/agentfiles/files.go:1429–1435  ·  view source on GitHub ↗

runeFrequency returns the count of each rune in s.

(s string)

Source from the content-addressed store, hash-verified

1427
1428// runeFrequency returns the count of each rune in s.
1429func runeFrequency(s string) map[rune]int {
1430 freq := make(map[rune]int)
1431 for _, r := range s {
1432 freq[r]++
1433 }
1434 return freq
1435}
1436
1437// seekLines scans contentLines looking for a contiguous subsequence that matches
1438// searchLines according to the provided `eq` function. It returns the start and

Callers 1

singleRuneCountMismatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected