Documentation ¶
Index ¶
- func ContainByInt(arr []int, element int) bool
- func Filter[T any](slice []T, f func(T) bool) []T
- func Find[T any](slice []T, f func(T) bool) (*T, error)
- func Int16ToInt(o []int16) []int
- func Int16ToInt32(o []int16) []int32
- func Int16ToInt64(o []int16) []int64
- func Int16ToInt8(o []int16) []int8
- func Int16ToUint(o []int16) []uint
- func Int32ToInt(o []int32) []int
- func Int32ToInt16(o []int32) []int16
- func Int32ToInt64(o []int32) []int64
- func Int32ToInt8(o []int32) []int8
- func Int32ToUint(o []int32) []uint
- func Int64ToInt(o []int64) []int
- func Int64ToInt16(o []int64) []int16
- func Int64ToInt32(o []int64) []int32
- func Int64ToInt8(o []int64) []int8
- func Int8ToInt(o []int8) []int
- func Int8ToInt16(o []int8) []int16
- func Int8ToInt32(o []int8) []int32
- func Int8ToInt64(o []int8) []int64
- func Int8ToUint(o []int8) []uint
- func IntToInt16(o []int) []int16
- func IntToInt32(o []int) []int32
- func IntToInt64(o []int) []int64
- func IntToInt8(o []int) []int8
- func IntToUint(o []int) []uint
- func IsSliceOrArray(x interface{}) bool
- func MoveElementToEndAndRemovePrevious[T any](arr []T, elementIndex int) ([]T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int16ToInt ¶
func Int16ToInt32 ¶
func Int16ToInt64 ¶
func Int16ToInt8 ¶
func Int16ToUint ¶
func Int32ToInt ¶
func Int32ToInt16 ¶
func Int32ToInt64 ¶
func Int32ToInt8 ¶
func Int32ToUint ¶
func Int64ToInt ¶
func Int64ToInt16 ¶
func Int64ToInt32 ¶
func Int64ToInt8 ¶
func Int8ToInt16 ¶
func Int8ToInt32 ¶
func Int8ToInt64 ¶
func Int8ToUint ¶
func IntToInt16 ¶
func IntToInt32 ¶
func IntToInt64 ¶
func MoveElementToEndAndRemovePrevious ¶
从数组中移除指定元素之前的全部元素,并将该元素放到数组末尾
例如:数组[1,2,3,4,5],移除元素3,结果为[4,5,1,2,3]
参数:
- arr: 需要修改的数组
- elementIndex: 需要移除的元素的索引
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.