array

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](args []T, target T) bool

Contains checks if the specified value exists in the slice.

func IsUnique

func IsUnique[T comparable](args []T) bool

IsUnique checks if the specified array contains duplicate values.

func MergeMap

func MergeMap(m1, m2 map[string]any) map[string]any

MergeMap merges two maps.

func NextArrayValue

func NextArrayValue(allValues []string, nowValue string) (string, error)

NextArrayValue returns the next value of the specified value in the array.

func PluckStringByIndex

func PluckStringByIndex(rows [][]string, index int) (r []string)

PluckStringByIndex returns an array of the specified index of the specified array.

func SliceString

func SliceString(all []string, start string, end string) (r []string, err error)

SliceString returns a slice of the specified array. If the start value is not specified, the first value of the array is used. If the end value is not specified, the last value of the array is used. If the end value is "next", the next value of the start value is used. If the end value is "max", the last value of the array is used.

func Unique

func Unique[T comparable](values []T) (r []T)

Unique returns an array with duplicate values removed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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