intslice

package
Version: v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 1 Imported by: 3

Documentation

Overview

Package intslice provides a few helper functions for dealing with []int.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Common added in v0.39.0

func Common(a, b []int) []int

func Contains

func Contains(list []int, a int) bool

Contains checks if an int is in a []int, returns bool.

func Difference added in v0.39.0

func Difference(a, b []int) []int

func Max added in v0.18.2

func Max(list []int) int

Max for a non-empty int slice.

func Min added in v0.18.2

func Min(list []int) int

Min for a non-empty int slice.

func NotCommon added in v0.39.0

func NotCommon(a, b []int) []int

func RemoveDuplicates added in v0.39.2

func RemoveDuplicates(options *[]int, otherStringsToClean ...int)

RemoveDuplicates in []int.

func Sum added in v0.31.0

func Sum(list []int) int

Sum of the contents of an []int.

func ToStringSlice

func ToStringSlice(in []int) []string

ToStringSlice transforms an []int to a []string.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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