uniq

package
v1.26.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: BSD-3-Clause Imports: 2 Imported by: 6

Documentation

Overview

Package uniq provides removal of adjacent duplicate elements in slices. It is similar to the unix command uniq.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModifySlice

func ModifySlice(sliceptr any, eq func(i, j int) bool)

ModifySlice removes adjacent duplicate elements from the slice pointed to by sliceptr. It adjusts the length of the slice appropriately and zeros the tail. eq reports whether (*sliceptr)[i] and (*sliceptr)[j] are equal. ModifySlice does O(len(*sliceptr)) operations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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