MCPcopy
hub / github.com/QuantumNous/new-api / Contains

Method Contains

types/set.go:24–27  ·  view source on GitHub ↗

Contains 检查 Set 是否包含某个元素

(item T)

Source from the content-addressed store, hash-verified

22
23// Contains 检查 Set 是否包含某个元素
24func (s *Set[T]) Contains(item T) bool {
25 _, exists := s.items[item]
26 return exists
27}
28
29// Len 返回 Set 中元素的数量
30func (s *Set[T]) Len() int {

Calls

no outgoing calls