sliceutil

package
v0.0.0-...-2d0e9f7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete[T any](sli []T, start, end int) (res []T)

func DeleteByIndex

func DeleteByIndex[T any](sli []T, i int) []T

func Filter

func Filter[T any](sli []T, filter func(element T) bool) (res []T)

func HasNull

func HasNull[T any](s ...[]T) bool

HasNull Check if has null in slices

func Insert

func Insert[T any](sli []T, i int, element ...T) []T

Insert Insert a element or a slience at the specified position of the sli

func IsEmpty

func IsEmpty[T any](s []T) bool

IsEmpty Check if a slice is empty

func IsNotEmpty

func IsNotEmpty[T any](s []T) bool

IsNotEmpty Check if a slice is not empty

func Range

func Range(end int) []int

func RangeByStep

func RangeByStep(start, end, step int) []int

Types

This section is empty.

Jump to

Keyboard shortcuts

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