setof

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Unlicense Imports: 1 Imported by: 0

README

Sets

import "setof"

func main()  {
    s := setof.NewStrings("aaa", "bbb", "aaa")
    print(len(s)) // 2
    s.Update("ccc", "444")
    print(s.Contains("123")) // false
    print(s.Contains("aaa")) // true
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Strings

type Strings map[string]struct{}

func NewStrings added in v1.0.4

func NewStrings(v ...string) Strings

func (Strings) Contains added in v1.0.4

func (set Strings) Contains(v string) bool

func (Strings) Remove added in v1.0.4

func (set Strings) Remove(v ...string) Strings

func (Strings) SortedList added in v1.0.4

func (set Strings) SortedList() []string

func (Strings) Update added in v1.0.4

func (set Strings) Update(v ...string) Strings

Jump to

Keyboard shortcuts

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