Help us shape the future of Go! Take the 2026 Go Developer Survey

stringset

package module
v0.0.0-...-12df33a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: ISC Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSetIsEmpty = errors.New("set is empty")
)

Functions

This section is empty.

Types

type StringSet

type StringSet struct {
	// contains filtered or unexported fields
}

func New

func New(elements ...string) *StringSet

func (*StringSet) Add

func (s *StringSet) Add(str string) bool

func (*StringSet) All

func (s *StringSet) All() []string

func (*StringSet) AllSorted

func (s *StringSet) AllSorted() []string

func (*StringSet) Clear

func (s *StringSet) Clear()

func (*StringSet) Difference

func (s *StringSet) Difference(other *StringSet) *StringSet

func (*StringSet) Equal

func (s *StringSet) Equal(other *StringSet) bool

func (*StringSet) Has

func (s *StringSet) Has(str string) bool

func (*StringSet) Intersection

func (s *StringSet) Intersection(other *StringSet) *StringSet

func (*StringSet) Len

func (s *StringSet) Len() int

func (*StringSet) Pop

func (s *StringSet) Pop() (string, error)

func (*StringSet) Raw

func (s *StringSet) Raw() map[string]struct{}

func (*StringSet) Remove

func (s *StringSet) Remove(str string) bool

func (*StringSet) Union

func (s *StringSet) Union(other *StringSet) *StringSet

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL