Documentation
¶
Overview ¶
Package stringset implements a basic set of strings
Index ¶
- type Data
- func (set *Data) Delete(key string)
- func (set *Data) Eq(other *Data) bool
- func (set *Data) Has(key string) bool
- func (set *Data) Intersect(other *Data) *Data
- func (set *Data) Len() int
- func (set *Data) Put(key string)
- func (set *Data) Subtract(other *Data) *Data
- func (set *Data) ToList() (result []string)
- func (set *Data) ToSortedList() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data represent a set of strings
func (*Data) Delete ¶
Delete deletes a string from the set. If the string doesn't exist this is a no-op
func (*Data) Intersect ¶
Intersect returns a new set containing all the elements that are present in both the set and the argument (set intersections).
func (*Data) Subtract ¶
Subtract returns a new set containing all the elements that are present in the set but not in the argument (set difference).
func (*Data) ToSortedList ¶
ToSortedList returns the string container in this set as a sorted string slice
Click to show internal directories.
Click to hide internal directories.