strings

package
v0.0.0-...-703489d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

Set is basic implementation of string based set.

func NewSet

func NewSet(ins ...string) Set

NewSet creates a new Set from given strings.

func (*Set) Add

func (s *Set) Add(in string)

Add adds a string to the Set.

func (*Set) All

func (s *Set) All(ins []string)

All adds all elements of a slice to the Set.

func (Set) Contains

func (s Set) Contains(elem string) bool

Contains checks if element exists within the Set.

func (Set) Equal

func (s Set) Equal(other Set) bool

Equal checks if given Set is equal to the other given Set.

func (Set) Len

func (s Set) Len() int

Len gets the length of the Set.

func (Set) Slice

func (s Set) Slice() []string

Slice coverts a Set to a []string.

Jump to

Keyboard shortcuts

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