MCPcopy Create free account
hub / github.com/Debian/dcs / maxLen

Method maxLen

internal/index/regexp.go:813–824  ·  view source on GitHub ↗

maxLen returns the length of the longest string in s.

()

Source from the content-addressed store, hash-verified

811
812// maxLen returns the length of the longest string in s.
813func (s stringSet) maxLen() int {
814 if len(s) == 0 {
815 return 0
816 }
817 m := len(s[0])
818 for _, str := range s {
819 if m < len(str) {
820 m = len(str)
821 }
822 }
823 return m
824}
825
826// union returns the union of s and t, reusing s's storage.
827func (s stringSet) union(t stringSet, isSuffix bool) stringSet {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected