sliceutil

package
v4.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice interface{}, value interface{}) bool

Contains check if a slice contains a value.

func ContainsStr

func ContainsStr(slice []string, value string) bool

ContainsStr check if a string slice contains a value. Prefer using this function instead of Contains for better performance.

func Equal

func Equal(first interface{}, second interface{}) bool

Equal check if two generic slices are the same.

func IndexOf

func IndexOf(slice interface{}, value interface{}) int

IndexOf get the index of the given value in the given slice, or -1 if not found.

func IndexOfStr

func IndexOfStr(slice []string, value string) int

IndexOfStr get the index of the given value in the given string slice, or -1 if not found. Prefer using this function instead of IndexOf for better performance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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