sortutil

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 3 Imported by: 0

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 Int32s

func Int32s(a []int32)

Int64s sorts a slice of int64s in increasing order.

func Int64s

func Int64s(a []int64)

Int64s sorts a slice of int64s in increasing order.

func Uint16s

func Uint16s(a []uint16)

Uint16s sorts a slice of uint16s in increasing order.

Types

type Int32Slice

type Int32Slice []int32

Int64Slice attaches the methods of Interface to []int64, sorting in increasing order.

func (Int32Slice) Len

func (p Int32Slice) Len() int

func (Int32Slice) Less

func (p Int32Slice) Less(i, j int) bool

func (Int32Slice) Sort

func (p Int32Slice) Sort()

Sort is a convenience method.

func (Int32Slice) Swap

func (p Int32Slice) Swap(i, j int)

type Int64Slice

type Int64Slice []int64

Int64Slice attaches the methods of Interface to []int64, sorting in increasing order.

func (Int64Slice) Len

func (p Int64Slice) Len() int

func (Int64Slice) Less

func (p Int64Slice) Less(i, j int) bool

func (Int64Slice) Sort

func (p Int64Slice) Sort()

Sort is a convenience method.

func (Int64Slice) Swap

func (p Int64Slice) Swap(i, j int)

type Uint16Slice

type Uint16Slice []uint16

Uint16Slice attaches the methods of Interface to []uint16, sorting in increasing order.

func (Uint16Slice) Len

func (p Uint16Slice) Len() int

func (Uint16Slice) Less

func (p Uint16Slice) Less(i, j int) bool

func (Uint16Slice) Sort

func (p Uint16Slice) Sort()

Sort is a convenience method.

func (Uint16Slice) Swap

func (p Uint16Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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