ucont

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Insert

func Insert[S ~[]T, T any](s S, index int, v T) S

func Remove

func Remove[S ~[]T, T any](s S, index int) S

func Reverse

func Reverse[S ~[]T, T any](s S)

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]

func (NumSlice[T]) Equal

func (this NumSlice[T]) Equal() bool

func (*NumSlice[T]) Sort

func (this *NumSlice[T]) Sort()

type Slice

type Slice[T any] []T

func NewSlice

func NewSlice[T any]() Slice[T]

func NewSliceWithCapacity

func NewSliceWithCapacity[T any](capacity int) Slice[T]

func NewSliceWithSize

func NewSliceWithSize[T any](size int) Slice[T]

func (Slice[T]) Back

func (this Slice[T]) Back() T

func (Slice[T]) Capacity

func (this Slice[T]) Capacity() int

func (*Slice[T]) Clear

func (this *Slice[T]) Clear()

func (*Slice[T]) CopyFrom

func (this *Slice[T]) CopyFrom(o Slice[T])

func (Slice[T]) Data

func (this Slice[T]) Data() []T

func (Slice[T]) Empty

func (this Slice[T]) Empty() bool

func (Slice[T]) Equal

func (this Slice[T]) Equal(o Slice[T], fn func(T, T) bool) bool

func (*Slice[T]) Erase

func (this *Slice[T]) Erase(index int)

func (*Slice[T]) EraseAll

func (this *Slice[T]) EraseAll(v T)

func (*Slice[T]) EraseIf

func (this *Slice[T]) EraseIf(fn func(T) bool)

func (Slice[T]) FromTo

func (this Slice[T]) FromTo(from, to int) Slice[T]

func (Slice[T]) Front

func (this Slice[T]) Front() T

func (Slice[T]) Head

func (this Slice[T]) Head(count int) Slice[T]

func (Slice[T]) HeadMax

func (this Slice[T]) HeadMax(count int) Slice[T]

func (*Slice[T]) Insert

func (this *Slice[T]) Insert(index int, v T)

func (*Slice[T]) PushBack

func (this *Slice[T]) PushBack(v T)

func (*Slice[T]) PushFront

func (this *Slice[T]) PushFront(v T)

func (*Slice[T]) Resize

func (this *Slice[T]) Resize(size int)

func (*Slice[T]) Reverse

func (this *Slice[T]) Reverse()

func (*Slice[T]) SetData

func (this *Slice[T]) SetData(data []T)

func (Slice[T]) Size

func (this Slice[T]) Size() int

func (*Slice[T]) Sort

func (this *Slice[T]) Sort(fn func(T, T))

func (Slice[T]) Tail

func (this Slice[T]) Tail(count int) Slice[T]

func (Slice[T]) TailMax

func (this Slice[T]) TailMax(count int) Slice[T]

func (*Slice[T]) Tansform

func (this *Slice[T]) Tansform(fn func(v T) T)

Jump to

Keyboard shortcuts

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