slice

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy[V any](slice []V) []V

Copy 复制特定切片

func CopyMatrix

func CopyMatrix[V any](slice [][]V) [][]V

CopyMatrix 复制二维数组

func Del

func Del[V any](slice *[]V, index int)

Del 删除特定索引的元素

func Insert

func Insert[V any](slice *[]V, index int, value V)

Insert 在特定索引插入元素

func Move

func Move[V any](slice *[]V, index, to int)

Move 移动特定索引

func NextLoop

func NextLoop[V any](slice []V, i int) (next int, value V)

NextLoop 返回 i 的下一个数组成员,当 i 达到数组长度时从 0 开始

  • 当 i 为 -1 时将返回第一个元素

Types

This section is empty.

Jump to

Keyboard shortcuts

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