slice

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Columns

func Columns[T any, K any](l []T, f func(T) K) []K

func Contains

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

func Distinct

func Distinct[T comparable](list []T) []T

func FirstEle

func FirstEle[T any](list []T) T

func HasEmpty

func HasEmpty[T comparable](list []T) bool

func IntsToStrings

func IntsToStrings[K constraints.Integer](l []K) []string

func Merge

func Merge[T constraints.Ordered](origin, target []T) []T

func Reverse

func Reverse[T any](nums []T)

func Split

func Split[T any](list []T, size int) [][]T

func StringsToInts

func StringsToInts[T constraints.Integer](list []string) []T

func StrsContains

func StrsContains[K ~string](l []K, target K) bool

func ToSet

func ToSet[T comparable](l []T) map[T]struct{}

func ToSetFunc

func ToSetFunc[T comparable, V any](l []any, f func(in any) (key T, value V)) map[T]V

Types

This section is empty.

Jump to

Keyboard shortcuts

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