soslice

package
v0.0.0-...-d9d0c30 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max[T Orderable](in []T) (out T)

求最大值

func MaxRanges

func MaxRanges[T Orderable](in []T, count ...int) (out map[int]T)

切片分段最大值

func Min

func Min[T Orderable](in []T) (out T)

求最小值

func MinRanges

func MinRanges[T Orderable](in []T, count ...int) (out map[int]T)

切片分段最小值

func Reverse

func Reverse[T Orderable](in []T)

翻转切片

Types

type Orderable

type Orderable interface {
	int | int8 | int16 | int32 | int64 |
		uint | uint8 | uint16 | uint32 | uint64 | uintptr |
		float32 | float64 |
		string
}

Jump to

Keyboard shortcuts

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