Files
lo/docs/data/core-dropbyindex.md
T
2025-10-06 17:15:49 +02:00

639 B

name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
name slug sourceRef category subCategory playUrl variantHelpers similarHelpers position signatures
DropByIndex dropbyindex slice.go#L501 core slice https://go.dev/play/p/bPIH4npZRxS
core#slice#dropbyindex
core#slice#drop
core#slice#dropright
core#slice#dropwhile
core#slice#droprightwhile
core#slice#slice
core#slice#withoutnth
core#slice#splice
210
func DropByIndex[T any, Slice ~[]T](collection Slice, indexes ...int) Slice

Drops elements from a slice by index. Negative indexes count from the end.

lo.DropByIndex([]int{0, 1, 2, 3, 4, 5}, 2, 4, -1)
// []int{0, 1, 3}