Documentation
¶
Index ¶
- func Insert[S ~[]T, T any](s S, index int, v T) S
- func Remove[S ~[]T, T any](s S, index int) S
- func Reverse[S ~[]T, T any](s S)
- type NumSlice
- type Slice
- func (this Slice[T]) Back() T
- func (this Slice[T]) Capacity() int
- func (this *Slice[T]) Clear()
- func (this *Slice[T]) CopyFrom(o Slice[T])
- func (this Slice[T]) Data() []T
- func (this Slice[T]) Empty() bool
- func (this Slice[T]) Equal(o Slice[T], fn func(T, T) bool) bool
- func (this *Slice[T]) Erase(index int)
- func (this *Slice[T]) EraseAll(v T)
- func (this *Slice[T]) EraseIf(fn func(T) bool)
- func (this Slice[T]) FromTo(from, to int) Slice[T]
- func (this Slice[T]) Front() T
- func (this Slice[T]) Head(count int) Slice[T]
- func (this Slice[T]) HeadMax(count int) Slice[T]
- func (this *Slice[T]) Insert(index int, v T)
- func (this *Slice[T]) PushBack(v T)
- func (this *Slice[T]) PushFront(v T)
- func (this *Slice[T]) Resize(size int)
- func (this *Slice[T]) Reverse()
- func (this *Slice[T]) SetData(data []T)
- func (this Slice[T]) Size() int
- func (this *Slice[T]) Sort(fn func(T, T))
- func (this Slice[T]) Tail(count int) Slice[T]
- func (this Slice[T]) TailMax(count int) Slice[T]
- func (this *Slice[T]) Tansform(fn func(v T) T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NumSlice ¶
type NumSlice[T constraints.Ordered] Slice[T]
Numeric slice
func NewNumSliceWithCapacity ¶
func NewNumSliceWithCapacity[T constraints.Ordered](capacity int) NumSlice[T]
func NewNumSliceWithSize ¶
func NewNumSliceWithSize[T constraints.Ordered](size int) NumSlice[T]
Click to show internal directories.
Click to hide internal directories.