sliceutil

package
v3.30.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsStringIgnoreCase

func ContainsStringIgnoreCase(s []string, v string) bool

func DeletePointerFunc added in v3.19.0

func DeletePointerFunc[Slice ~[]T, T any](s Slice, f func(*T) bool) Slice

DeletePointerFunc deletes all elements from the slice for which the function f returns true.

func EqualIgnoreOrder added in v3.30.0

func EqualIgnoreOrder[T comparable](s1, s2 []T) bool

EqualIgnoreOrder checks if two slices contain the same elements, regardless of their order. This is not optimized for memory usage and is intended for use at startup only. Empty and nil slices are considered equal, matching slices.Equal behavior.

func IndexPointerFunc added in v3.19.0

func IndexPointerFunc[Slice ~[]T, T any](s Slice, f func(*T) bool) int

IndexPointerFunc returns the index of the first element in the slice for which the function f returns true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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