arrays

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 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

Difference Find out the elements in s1 and not in s2

func InArray

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

InArray Determine whether a value is included in the array

func Intersect

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

Intersect Get the intersection of two slices

func RemoveDuplicateWithInt

func RemoveDuplicateWithInt(arr []int) []int

RemoveDuplicateWithInt Remove duplicate values

func RemoveDuplicateWithString

func RemoveDuplicateWithString(arr []string) []string

RemoveDuplicateWithString Remove duplicate values

func RemoveWithInt

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

RemoveWithInt Delete the specified value in the array

func RemoveWithString

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

RemoveWithString 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