slices

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package slices provides a compatibility layer until g1.20 is out of maintenance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinarySearch

func BinarySearch[S ~[]E, E cmp.Ordered](x S, target E) (int, bool)

BinarySearch is used as a wrapper to slices/BinarySearch.

func Compact

func Compact[S ~[]E, E comparable](s S) S

Compact is used as a wrapper to slices/Compact.

func Grow added in v1.6.6

func Grow[S ~[]E, E any](s S, n int) S

Grow is used as a wrapper to slices/Grow.

func Sort

func Sort[S ~[]E, E cmp.Ordered](x S)

Sort is used as a wrapper to slices/Sort.

func SortFunc

func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int)

SortFunc is used as a wrapper to slices/SortFunc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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