arrays

package
v1.3.22 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Difference

func Difference(s1, s2 []int) []int

Find out the elements in s1 and not in s2

func InArray

func InArray(val interface{}, array interface{}) (exists bool, index int)

Determine whether a value is included in the array

func Intersect

func Intersect(slice1 []int, slice2 []int) []int

Get the intersection of two slices

func RemoveDuplicateWithInt

func RemoveDuplicateWithInt(arr []int) []int

Remove duplicate values

func RemoveDuplicateWithString

func RemoveDuplicateWithString(arr []string) []string

Remove duplicate values

func RemoveWithInt

func RemoveWithInt(arr []int, in int) []int

Delete the specified value in the array

func RemoveWithString

func RemoveWithString(arr []string, in string) []string

Delete the specified value in the array

Types

This section is empty.

Jump to

Keyboard shortcuts

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