MCPcopy Create free account
hub / github.com/DNAProject/DNA / Has

Method Has

p2pserver/common/set/string_set.go:69–72  ·  view source on GitHub ↗

Has returns true if and only if item is contained in the set.

(item string)

Source from the content-addressed store, hash-verified

67
68// Has returns true if and only if item is contained in the set.
69func (s StringSet) Has(item string) bool {
70 _, contained := s[item]
71 return contained
72}
73
74// Len returns the size of the set.
75func (s StringSet) Len() int {

Callers 3

TestStringSetFunction · 0.95
TestNewStringSetFunction · 0.95

Calls

no outgoing calls

Tested by 3

TestStringSetFunction · 0.76
TestNewStringSetFunction · 0.76