sortutil

package
v0.72.6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InArrayStringCaseInsensitive

func InArrayStringCaseInsensitive(haystack []string, needle string) (string, error)

For now, use only for slices < 100 in length for performance. To do: more scalable implementation that uses sorting/searching.

func IntegerSuffix added in v0.72.2

func IntegerSuffix(values []string) []string

IntegerSuffix sorts strings like "ABC-10", "ABC-2", "XYZ", "FOO-bar". - Stable sort - Only numeric suffixes are considered

func Slice added in v0.45.0

func Slice[E constraints.Ordered](s []E)

Slice sorts a slice of items that comply wth `constraints.Ordered`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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