Documentation
¶
Index ¶
- func Clip[S ~[]E, E any](s S) S
- func Clone[S ~[]E, E any](s S) S
- func CompareFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, cmp func(E1, E2) int) int
- func Contains[S ~[]E, E comparable](s S, v E) bool
- func ContainsFunc[S ~[]E, E any](s S, f func(E) bool) bool
- func Delete[S ~[]E, E any](s S, i, j int) S
- func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S
- func Equal[S ~[]E, E comparable](s1, s2 S) bool
- func Index[S ~[]E, E comparable](s S, v E) int
- func IndexFunc[S ~[]E, E any](s S, f func(E) bool) int
- func IsSortedFunc[S ~[]E, E any](x S, cmp func(a, b E) int) bool
- func Max[S ~[]E, E Ordered](x S) E
- func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int)
- type Ordered
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clip ¶ added in v2.3.0
func Clip[S ~[]E, E any](s S) S
Clip removes unused capacity from the slice, returning s[:len(s):len(s)].
func CompareFunc ¶
func Contains ¶
func Contains[S ~[]E, E comparable](s S, v E) bool
func ContainsFunc ¶
func DeleteFunc ¶
func Equal ¶ added in v2.3.0
func Equal[S ~[]E, E comparable](s1, s2 S) bool
func Index ¶
func Index[S ~[]E, E comparable](s S, v E) int
func IsSortedFunc ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.