MCPcopy Index your code
hub / github.com/google/codesearch / isSubsetOf

Method isSubsetOf

index/regexp.go:861–872  ·  view source on GitHub ↗

isSubsetOf returns true if all strings in s are also in t. It assumes both sets are sorted.

(t stringSet)

Source from the content-addressed store, hash-verified

859// isSubsetOf returns true if all strings in s are also in t.
860// It assumes both sets are sorted.
861func (s stringSet) isSubsetOf(t stringSet) bool {
862 j := 0
863 for _, ss := range s {
864 for j < len(t) && t[j] < ss {
865 j++
866 }
867 if j >= len(t) || t[j] != ss {
868 return false
869 }
870 }
871 return true
872}

Callers 2

impliesMethod · 0.80
trigramsImplyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected