package
Version:
v0.0.0-...-c1b4e3e
Opens a new window with list of versions in this module.
Published: Jan 30, 2025
License: GPL-3.0, LGPL-3.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
IsSorted checks if any ordered-typed slice is sorted.
Number sorts slice of any numeric type (signed/unsigned, integer/float).
Ordered sorts in-place a slice of any ordered-type elements, including any numbers and strings.
func Slice[E any](vals []E, less func(i, j int) bool)
Slice is the generic variant for general slice sorting.
func String[E ~string](vals []E)
String sorts a slice of any type rooted in `string`.
StringSet sorts the keys in a set (a map[string]struct{}) in
lexicographical order.
TODO add parametric type
Source Files
¶
Click to show internal directories.
Click to hide internal directories.