package
Version:
v1.6.9
Opens a new window with list of versions in this module.
Published: Dec 29, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package slices provides a compatibility layer until g1.20 is out of maintenance.
-
func BinarySearch[S ~[]E, E cmp.Ordered](x S, target E) (int, bool)
-
func Compact[S ~[]E, E comparable](s S) S
-
func Grow[S ~[]E, E any](s S, n int) S
-
func Sort[S ~[]E, E cmp.Ordered](x S)
-
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int)
BinarySearch is used as a wrapper to slices/BinarySearch.
Compact is used as a wrapper to slices/Compact.
func Grow[S ~[]E, E any](s S, n int) S
Grow is used as a wrapper to slices/Grow.
Sort is used as a wrapper to slices/Sort.
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int)
SortFunc is used as a wrapper to slices/SortFunc.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.