intslice

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntAppendUnique

func IntAppendUnique(vs []int, toAdd int) []int

IntAppendUnique appends toAdd to the vs int slice if toAdd does not already exist in the slice. It returns the new or unchanged int slice.

func IntAppendUniques

func IntAppendUniques(vs []int, toAdd []int) []int

IntAppendUniques appends a slice of int values to the vs int slice. It only appends values that do not already exist in the slice. It returns the new or unchanged int slice.

func IntExclude

func IntExclude(vs []int, toExclude []int) []int

IntExclude removes all instances of any value in toExclude from the vs int slice. It returns the new or unchanged int slice.

func IntInclude

func IntInclude(vs []int, t int) bool

IntInclude returns true if the provided int value exists in the provided int slice.

func IntIndex

func IntIndex(vs []int, t int) int

IntIndex returns the first index of the provided int value in the provided int slice. It returns -1 if it is not found.

func IntIntercect added in v0.17.0

func IntIntercect(v1, v2 []int) []int

IntIntercect returns a slice of ints containing values that exist in both provided slices.

func IntNotIntersect added in v0.17.0

func IntNotIntersect(v1, v2 []int) []int

IntNotIntersect returns a slice of ints containing values that do not exist in both provided slices.

func IntSliceToStringSlice

func IntSliceToStringSlice(ss []int) []string

IntSliceToStringSlice converts a slice of ints to a slice of strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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