slices

package
v0.0.0-...-a8baca3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice, item any) bool

func Cut

func Cut(slice any, i, j int) any

func DeleteIndex

func DeleteIndex(slice any, i int) any

func Expand

func Expand(slice any, i, j int) any

Expand всталвяет в массив slice в элемент i дополнительные пустые поля в количестве j

func ForEach

func ForEach(slice any, f func(index int, i any))

ForEach is special function, when you just know, that some variable is slice. try to not use this func instead, for _,_ := range _ is WAY MORE preferrable. This func is only is useful for rarest situtations

func Index

func Index(slice, item any) int

индекс элемента T в []T выводит индекс найденого элемента, либо -1, если элемент не найден

func PopFunc

func PopFunc(slice any, f func(i any) bool) (res, popped any)

if f func returns true, than slice item will pop @interface SlicePopFunc(slice []<T>, f func(<T>)bool) (res, popped []<T>)

func RemoveFunc

func RemoveFunc(slice any, f func(i any) bool) any

@interface SliceRemoveFunc(slice []<T>, f func(<T>)bool) []<T>

func ToInterfaceSlice

func ToInterfaceSlice(in any) []any

func Unique

func Unique(in any) any

TODO: неправильная имплементация []<T> -> map[<T>]struct{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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