zutils

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayColumn

func ArrayColumn[T comparable](input []map[string]T, columnKey string) []T

func ArrayCombine

func ArrayCombine[K, V comparable](keys []K, values []V) map[K]V

func ArrayDiff

func ArrayDiff[T comparable](array1, array2 []T) []T

func ArrayFilter

func ArrayFilter(input any, callback func(any) bool) any

func ArrayFlip

func ArrayFlip(input any) any

func ArrayIntersect

func ArrayIntersect[T comparable](array1, array2 []T) []T

func ArrayKeyExists

func ArrayKeyExists[K, V comparable](k K, m map[K]V) bool

func ArrayKeys

func ArrayKeys(input any) any

func ArrayPad

func ArrayPad[T comparable](array []T, size int, value T) []T

func ArrayPop

func ArrayPop[T comparable](s *[]T) T

func ArrayPush

func ArrayPush[T comparable](s *[]T, elements ...T) int

func ArrayRemove

func ArrayRemove[T comparable](slice []T, s int) []T

func ArrayReverse

func ArrayReverse[T comparable](s []T) []T

func ArrayShift

func ArrayShift[T comparable](s *[]T) T

func ArraySlice

func ArraySlice[T comparable](array []T, offset, length uint) []T

func ArraySum

func ArraySum[T constraints.Ordered](array []T) T

func ArrayUnique

func ArrayUnique[T comparable](s []T) []T

func ArrayUnshift

func ArrayUnshift[T comparable](s *[]T, elements ...T) int

func Contains

func Contains(s string, sl []string) bool

func InArray

func InArray[T comparable](needle T, haystack []T) bool

func KeyExists

func KeyExists[K, V comparable](k K, m map[K]V) bool

func ParseFloat added in v1.4.3

func ParseFloat(s string) float64

func ParseFloatN added in v1.4.3

func ParseFloatN(s string, bitSize int) float64

func ParseInt added in v1.4.3

func ParseInt(s string) int

func ParseInt64 added in v1.4.3

func ParseInt64(s string) int64

func ParseUInt added in v1.4.3

func ParseUInt(s string) uint64

func ReplaceArgs

func ReplaceArgs(s string, args map[string]any) string

func Rsort

func Rsort[T constraints.Ordered](array []T) []T

func Sort

func Sort[T constraints.Ordered](array []T) []T

Types

This section is empty.

Jump to

Keyboard shortcuts

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