Documentation ¶
Index ¶
- func Contains(slice, item any) bool
- func Cut(slice any, i, j int) any
- func DeleteIndex(slice any, i int) any
- func Expand(slice any, i, j int) any
- func ForEach(slice any, f func(index int, i any))
- func Index(slice, item any) int
- func PopFunc(slice any, f func(i any) bool) (res, popped any)
- func RemoveFunc(slice any, f func(i any) bool) any
- func ToInterfaceSlice(in any) []any
- func Unique(in any) any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.