SkipLast¶
func SkipLast[T any](slice []T, n int) []T
SkipLast returns the slice with the last n elements removed. If n is greater than or equal to the slice length, returns an empty slice. If n is zero or negative, returns the original slice.
func SkipLast[T any](slice []T, n int) []T
SkipLast returns the slice with the last n elements removed. If n is greater than or equal to the slice length, returns an empty slice. If n is zero or negative, returns the original slice.