ameda_loc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

README

ameda report card GoDoc

Powerful toolbox for golang data types.

Yeah!

It is recommended to use gust instead!

Documentation

Index

Constants

View Source
const (
	Host64bit      = strconv.IntSize == 64
	Host32bit      = ^uint(0)>>32 == 0
	MaxUnsignedInt = ^uint(0)
	MinUnsignedInt = 0
	MaxInteger     = int(MaxUnsignedInt >> 1)
	MinInteger     = -MaxInteger - 1
)

Variables

This section is empty.

Functions

func AppendInt

func AppendInt(dst []byte, i int64, base int) []byte

AppendInt appends the string form of the integer i, as generated by FormatInt, to dst and returns the extended buffer. NOTE:

Compatible with standard package strconv.

func AppendUint

func AppendUint(dst []byte, i uint64, base int) []byte

AppendUint appends the string form of the unsigned integer i, as generated by FormatUint, to dst and returns the extended buffer. NOTE:

Compatible with standard package strconv.

func Atoi

func Atoi(s string) (int, error)

Atoi is equivalent to ParseInt(s, 10, 0), converted to type int.

func BoolToBoolPtr

func BoolToBoolPtr(v bool) *bool

BoolToBoolPtr converts bool to *bool.

func BoolToFloat32

func BoolToFloat32(v bool) float32

BoolToFloat32 converts bool to float32.

func BoolToFloat32Ptr

func BoolToFloat32Ptr(v bool) *float32

BoolToFloat32Ptr converts bool to *float32.

func BoolToFloat64

func BoolToFloat64(v bool) float64

BoolToFloat64 converts bool to float64.

func BoolToFloat64Ptr

func BoolToFloat64Ptr(v bool) *float64

BoolToFloat64Ptr converts bool to *float64.

func BoolToInt

func BoolToInt(v bool) int

BoolToInt converts bool to int.

func BoolToInt16

func BoolToInt16(v bool) int16

BoolToInt16 converts bool to int16.

func BoolToInt16Ptr

func BoolToInt16Ptr(v bool) *int16

BoolToInt16Ptr converts bool to *int16.

func BoolToInt32

func BoolToInt32(v bool) int32

BoolToInt32 converts bool to int32.

func BoolToInt32Ptr

func BoolToInt32Ptr(v bool) *int32

BoolToInt32Ptr converts bool to *int32.

func BoolToInt64

func BoolToInt64(v bool) int64

BoolToInt64 converts bool to int64.

func BoolToInt64Ptr

func BoolToInt64Ptr(v bool) *int64

BoolToInt64Ptr converts bool to *int64.

func BoolToInt8

func BoolToInt8(v bool) int8

BoolToInt8 converts bool to int8.

func BoolToInt8Ptr

func BoolToInt8Ptr(v bool) *int8

BoolToInt8Ptr converts bool to *int8.

func BoolToIntPtr

func BoolToIntPtr(v bool) *int

BoolToIntPtr converts bool to *int.

func BoolToInterface

func BoolToInterface(v bool) interface{}

BoolToInterface converts bool to interface.

func BoolToInterfacePtr

func BoolToInterfacePtr(v bool) *interface{}

BoolToInterfacePtr converts bool to *interface.

func BoolToString

func BoolToString(v bool) string

BoolToString converts bool to string.

func BoolToStringPtr

func BoolToStringPtr(v bool) *string

BoolToStringPtr converts bool to *string.

func BoolToUint

func BoolToUint(v bool) uint

BoolToUint converts bool to uint.

func BoolToUint16

func BoolToUint16(v bool) uint16

BoolToUint16 converts bool to uint16.

func BoolToUint16Ptr

func BoolToUint16Ptr(v bool) *uint16

BoolToUint16Ptr converts bool to *uint16.

func BoolToUint32

func BoolToUint32(v bool) uint32

BoolToUint32 converts bool to uint32.

func BoolToUint32Ptr

func BoolToUint32Ptr(v bool) *uint32

BoolToUint32Ptr converts bool to *uint32.

func BoolToUint64

func BoolToUint64(v bool) uint64

BoolToUint64 converts bool to uint64.

func BoolToUint64Ptr

func BoolToUint64Ptr(v bool) *uint64

BoolToUint64Ptr converts bool to *uint64.

func BoolToUint8

func BoolToUint8(v bool) uint8

BoolToUint8 converts bool to uint8.

func BoolToUint8Ptr

func BoolToUint8Ptr(v bool) *uint8

BoolToUint8Ptr converts bool to *uint8.

func BoolToUintPtr

func BoolToUintPtr(v bool) *uint

BoolToUintPtr converts bool to *uint.

func BoolsConcat

func BoolsConcat(b ...[]bool) []bool

BoolsConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func BoolsCopy

func BoolsCopy(b []bool) []bool

BoolsCopy creates a copy of the bool slice.

func BoolsCopyWithin

func BoolsCopyWithin(b []bool, target, start int, end ...int)

BoolsCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func BoolsDistinct

func BoolsDistinct(b *[]bool, changeSlice bool) (distinctCount map[bool]int)

BoolsDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func BoolsEvery

func BoolsEvery(b []bool, fn func(b []bool, k int, v bool) bool) bool

BoolsEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func BoolsFill

func BoolsFill(b []bool, value bool, start int, end ...int)

BoolsFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func BoolsFilter

func BoolsFilter(b []bool, fn func(b []bool, k int, v bool) bool) []bool

BoolsFilter creates a new slice with all elements that pass the test implemented by the provided function.

func BoolsFind

func BoolsFind(b []bool, fn func(b []bool, k int, v bool) bool) (k int, v bool)

BoolsFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func BoolsIncludes

func BoolsIncludes(b []bool, valueToFind bool, fromIndex ...int) bool

BoolsIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func BoolsIndexOf

func BoolsIndexOf(b []bool, searchElement bool, fromIndex ...int) int

BoolsIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func BoolsIntersect

func BoolsIntersect(b ...[]bool) (intersectCount map[bool]int)

BoolsIntersect calculates intersection of two or more slices, and returns the count of each element.

func BoolsLastIndexOf

func BoolsLastIndexOf(b []bool, searchElement bool, fromIndex ...int) int

BoolsLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func BoolsMap

func BoolsMap(b []bool, fn func(b []bool, k int, v bool) bool) []bool

BoolsMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func BoolsPop

func BoolsPop(b *[]bool) (elem bool, found bool)

BoolsPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func BoolsPush

func BoolsPush(b *[]bool, element ...bool) int

BoolsPush adds one or more elements to the end of an slice and returns the new length of the slice.

func BoolsPushDistinct

func BoolsPushDistinct(b []bool, element ...bool) []bool

BoolsPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func BoolsReduce

func BoolsReduce(
	b []bool,
	fn func(b []bool, k int, v, accumulator bool) bool, initialValue ...bool,
) bool

BoolsReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func BoolsReduceRight

func BoolsReduceRight(
	b []bool,
	fn func(b []bool, k int, v, accumulator bool) bool, initialValue ...bool,
) bool

BoolsReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func BoolsRemoveEvery

func BoolsRemoveEvery(p *[]bool, elements ...bool) int

BoolsRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func BoolsRemoveFirst

func BoolsRemoveFirst(p *[]bool, elements ...bool) int

BoolsRemoveFirst removes the first matched element from the slice, and returns the new length of the slice.

func BoolsReverse

func BoolsReverse(b []bool)

BoolsReverse reverses an slice in place.

func BoolsShift

func BoolsShift(b *[]bool) (element bool, found bool)

BoolsShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func BoolsSlice

func BoolsSlice(b []bool, begin int, end ...int) []bool

BoolsSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func BoolsSome

func BoolsSome(b []bool, fn func(b []bool, k int, v bool) bool) bool

BoolsSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func BoolsSplice

func BoolsSplice(b *[]bool, start, deleteCount int, items ...bool)

BoolsSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func BoolsToFloat32s

func BoolsToFloat32s(b []bool) []float32

BoolsToFloat32s converts int8 slice to float32 slice.

func BoolsToFloat64s

func BoolsToFloat64s(b []bool) []float64

BoolsToFloat64s converts int8 slice to float64 slice.

func BoolsToInt16s

func BoolsToInt16s(b []bool) []int16

BoolsToInt16s converts int8 slice to int16 slice.

func BoolsToInt32s

func BoolsToInt32s(b []bool) []int32

BoolsToInt32s converts int8 slice to int32 slice.

func BoolsToInt64s

func BoolsToInt64s(b []bool) []int64

BoolsToInt64s converts int8 slice to int64 slice.

func BoolsToInterfaces

func BoolsToInterfaces(b []bool) []interface{}

BoolsToInterfaces converts int8 slice to interface slice.

func BoolsToInts

func BoolsToInts(b []bool) []int

BoolsToInts converts int8 slice to int slice.

func BoolsToStrings

func BoolsToStrings(b []bool) []string

BoolsToStrings converts int8 slice to string slice.

func BoolsToUint16s

func BoolsToUint16s(b []bool) []uint16

BoolsToUint16s converts bool slice to uint16 slice.

func BoolsToUint32s

func BoolsToUint32s(b []bool) []uint32

BoolsToUint32s converts bool slice to uint32 slice.

func BoolsToUint64s

func BoolsToUint64s(b []bool) []uint64

BoolsToUint64s converts bool slice to uint64 slice.

func BoolsToUint8s

func BoolsToUint8s(b []bool) []uint8

BoolsToUint8s converts bool slice to uint8 slice.

func BoolsToUints

func BoolsToUints(b []bool) []uint

BoolsToUints converts bool slice to uint slice.

func BoolsUnshift

func BoolsUnshift(b *[]bool, element ...bool) int

BoolsUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func BoolsUnshiftDistinct

func BoolsUnshiftDistinct(b *[]bool, element ...bool) int

BoolsUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func DereferenceImplementType

func DereferenceImplementType(v reflect.Value) reflect.Type

DereferenceImplementType returns the underlying type of the value that implements the interface v.

func DereferenceInterfaceValue

func DereferenceInterfaceValue(v reflect.Value) reflect.Value

DereferenceInterfaceValue returns the value of the underlying type that implements the interface v.

func DereferencePtrValue

func DereferencePtrValue(v reflect.Value) reflect.Value

DereferencePtrValue returns the underlying non-pointer type value.

func DereferenceSlice

func DereferenceSlice(v reflect.Value) reflect.Value

DereferenceSlice convert []*T to []T.

func DereferenceType

func DereferenceType(t reflect.Type) reflect.Type

DereferenceType dereference, get the underlying non-pointer type.

func DereferenceValue

func DereferenceValue(v reflect.Value) reflect.Value

DereferenceValue dereference and unpack interface, get the underlying non-pointer and non-interface value.

func Float32SetDifference

func Float32SetDifference(set1, set2 []float32, others ...[]float32) []float32

Float32SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Float32SetIntersect

func Float32SetIntersect(set1, set2 []float32, others ...[]float32) []float32

Float32SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Float32SetUnion

func Float32SetUnion(set1, set2 []float32, others ...[]float32) []float32

Float32SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Float32ToBool

func Float32ToBool(v float32) bool

Float32ToBool converts float32 to bool.

func Float32ToBoolPtr

func Float32ToBoolPtr(v float32) *bool

Float32ToBoolPtr converts float32 to *bool.

func Float32ToFloat32Ptr

func Float32ToFloat32Ptr(v float32) *float32

Float32ToFloat32Ptr converts float32 to *float32.

func Float32ToFloat64

func Float32ToFloat64(v float32) float64

Float32ToFloat64 converts float32 to float64.

func Float32ToFloat64Ptr

func Float32ToFloat64Ptr(v float32) *float64

Float32ToFloat64Ptr converts float32 to *float64.

func Float32ToInt

func Float32ToInt(v float32) (int, error)

Float32ToInt converts float32 to int.

func Float32ToInt16

func Float32ToInt16(v float32) (int16, error)

Float32ToInt16 converts float32 to int16.

func Float32ToInt16Ptr

func Float32ToInt16Ptr(v float32) (*int16, error)

Float32ToInt16Ptr converts float32 to *int16.

func Float32ToInt32

func Float32ToInt32(v float32) (int32, error)

Float32ToInt32 converts float32 to int32.

func Float32ToInt32Ptr

func Float32ToInt32Ptr(v float32) (*int32, error)

Float32ToInt32Ptr converts float32 to *int32.

func Float32ToInt64

func Float32ToInt64(v float32) (int64, error)

Float32ToInt64 converts float32 to int64.

func Float32ToInt64Ptr

func Float32ToInt64Ptr(v float32) (*int64, error)

Float32ToInt64Ptr converts float32 to *int64.

func Float32ToInt8

func Float32ToInt8(v float32) (int8, error)

Float32ToInt8 converts float32 to int8.

func Float32ToInt8Ptr

func Float32ToInt8Ptr(v float32) (*int8, error)

Float32ToInt8Ptr converts float32 to *int8.

func Float32ToInterface

func Float32ToInterface(v float32) interface{}

Float32ToInterface converts float32 to interface.

func Float32ToInterfacePtr

func Float32ToInterfacePtr(v float32) *interface{}

Float32ToInterfacePtr converts float32 to *interface.

func Float32ToString

func Float32ToString(v float32) string

Float32ToString converts float32 to string.

func Float32ToStringPtr

func Float32ToStringPtr(v float32) *string

Float32ToStringPtr converts float32 to *string.

func Float32ToUint

func Float32ToUint(v float32) (uint, error)

Float32ToUint converts float32 to uint.

func Float32ToUint16

func Float32ToUint16(v float32) (uint16, error)

Float32ToUint16 converts float32 to uint16.

func Float32ToUint16Ptr

func Float32ToUint16Ptr(v float32) (*uint16, error)

Float32ToUint16Ptr converts float32 to *uint16.

func Float32ToUint32

func Float32ToUint32(v float32) (uint32, error)

Float32ToUint32 converts float32 to uint32.

func Float32ToUint32Ptr

func Float32ToUint32Ptr(v float32) (*uint32, error)

Float32ToUint32Ptr converts float32 to *uint32.

func Float32ToUint64

func Float32ToUint64(v float32) (uint64, error)

Float32ToUint64 converts float32 to uint64.

func Float32ToUint64Ptr

func Float32ToUint64Ptr(v float32) (*uint64, error)

Float32ToUint64Ptr converts float32 to *uint64.

func Float32ToUint8

func Float32ToUint8(v float32) (uint8, error)

Float32ToUint8 converts float32 to uint8.

func Float32ToUint8Ptr

func Float32ToUint8Ptr(v float32) (*uint8, error)

Float32ToUint8Ptr converts float32 to *uint8.

func Float32ToUintPtr

func Float32ToUintPtr(v float32) (*uint, error)

Float32ToUintPtr converts float32 to *uint.

func Float32sCopy

func Float32sCopy(f []float32) []float32

Float32sCopy creates a copy of the float32 slice.

func Float32sCopyWithin

func Float32sCopyWithin(f []float32, target, start int, end ...int)

Float32sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Float32sDistinct

func Float32sDistinct(f *[]float32, changeSlice bool) (distinctCount map[float32]int)

Float32sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Float32sEvery

func Float32sEvery(f []float32, fn func(f []float32, k int, v float32) bool) bool

Float32sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Float32sFill

func Float32sFill(f []float32, value float32, start int, end ...int)

Float32sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Float32sFilter

func Float32sFilter(f []float32, fn func(f []float32, k int, v float32) bool) []float32

Float32sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Float32sFind

func Float32sFind(f []float32, fn func(f []float32, k int, v float32) bool) (k int, v float32)

Float32sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Float32sIncludes

func Float32sIncludes(f []float32, valueToFind float32, fromIndex ...int) bool

Float32sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Float32sIndexOf

func Float32sIndexOf(f []float32, searchElement float32, fromIndex ...int) int

Float32sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Float32sIntersect

func Float32sIntersect(f ...[]float32) (intersectCount map[float32]int)

Float32sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Float32sLastIndexOf

func Float32sLastIndexOf(f []float32, searchElement float32, fromIndex ...int) int

Float32sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Float32sMap

func Float32sMap(f []float32, fn func(f []float32, k int, v float32) float32) []float32

Float32sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Float32sPop

func Float32sPop(f *[]float32) (float32, bool)

Float32sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Float32sPush

func Float32sPush(f *[]float32, element ...float32) int

Float32sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Float32sPushDistinct

func Float32sPushDistinct(f []float32, element ...float32) []float32

Float32sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Float32sReduce

func Float32sReduce(
	f []float32,
	fn func(f []float32, k int, v, accumulator float32) float32, initialValue ...float32,
) float32

Float32sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Float32sReduceRight

func Float32sReduceRight(
	f []float32,
	fn func(f []float32, k int, v, accumulator float32) float32, initialValue ...float32,
) float32

Float32sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Float32sRemoveEvery

func Float32sRemoveEvery(p *[]float32, elements ...float32) int

Float32sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Float32sRemoveFirst

func Float32sRemoveFirst(p *[]float32, elements ...float32) int

Float32sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Float32sReverse

func Float32sReverse(f []float32)

Float32sReverse reverses an slice in place.

func Float32sShift

func Float32sShift(f *[]float32) (float32, bool)

Float32sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Float32sSlice

func Float32sSlice(f []float32, begin int, end ...int) []float32

Float32sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Float32sSome

func Float32sSome(f []float32, fn func(f []float32, k int, v float32) bool) bool

Float32sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Float32sSplice

func Float32sSplice(f *[]float32, start, deleteCount int, items ...float32)

Float32sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Float32sToBools

func Float32sToBools(f []float32) []bool

Float32sToBools converts float32 slice to bool slice. NOTE:

0 is false, everything else is true

func Float32sToFloat64s

func Float32sToFloat64s(f []float32) []float64

Float32sToFloat64s converts float32 slice to float64 slice.

func Float32sToInt16s

func Float32sToInt16s(f []float32) ([]int16, error)

Float32sToInt16s converts float32 slice to int16 slice.

func Float32sToInt32s

func Float32sToInt32s(f []float32) ([]int32, error)

Float32sToInt32s converts float32 slice to int32 slice.

func Float32sToInt64s

func Float32sToInt64s(f []float32) ([]int64, error)

Float32sToInt64s converts float32 slice to int64 slice.

func Float32sToInt8s

func Float32sToInt8s(f []float32) ([]int8, error)

Float32sToInt8s converts float32 slice to int8 slice.

func Float32sToInterfaces

func Float32sToInterfaces(f []float32) []interface{}

Float32sToInterfaces converts float32 slice to interface slice.

func Float32sToInts

func Float32sToInts(f []float32) ([]int, error)

Float32sToInts converts float32 slice to int slice.

func Float32sToStrings

func Float32sToStrings(f []float32) []string

Float32sToStrings converts float32 slice to string slice.

func Float32sToUint16s

func Float32sToUint16s(f []float32) ([]uint16, error)

Float32sToUint16s converts float32 slice to uint16 slice.

func Float32sToUint32s

func Float32sToUint32s(f []float32) ([]uint32, error)

Float32sToUint32s converts float32 slice to uint32 slice.

func Float32sToUint64s

func Float32sToUint64s(f []float32) ([]uint64, error)

Float32sToUint64s converts float32 slice to uint64 slice.

func Float32sToUint8s

func Float32sToUint8s(f []float32) ([]uint8, error)

Float32sToUint8s converts float32 slice to uint8 slice.

func Float32sToUints

func Float32sToUints(f []float32) ([]uint, error)

Float32sToUints converts float32 slice to uint slice.

func Float32sUnshift

func Float32sUnshift(f *[]float32, element ...float32) int

Float32sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Float32sUnshiftDistinct

func Float32sUnshiftDistinct(f *[]float32, element ...float32) int

Float32sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Float64SetDifference

func Float64SetDifference(set1, set2 []float64, others ...[]float64) []float64

Float64SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Float64SetIntersect

func Float64SetIntersect(set1, set2 []float64, others ...[]float64) []float64

Float64SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Float64SetUnion

func Float64SetUnion(set1, set2 []float64, others ...[]float64) []float64

Float64SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Float64ToBool

func Float64ToBool(v float64) bool

Float64ToBool converts float64 to bool.

func Float64ToBoolPtr

func Float64ToBoolPtr(v float64) *bool

Float64ToBoolPtr converts float64 to *bool.

func Float64ToFloat32

func Float64ToFloat32(v float64) (float32, error)

Float64ToFloat32 converts float64 to float32.

func Float64ToFloat32Ptr

func Float64ToFloat32Ptr(v float64) (*float32, error)

Float64ToFloat32Ptr converts float64 to *float32.

func Float64ToFloat64Ptr

func Float64ToFloat64Ptr(v float64) *float64

Float64ToFloat64Ptr converts float64 to *float64.

func Float64ToInt

func Float64ToInt(v float64) (int, error)

Float64ToInt converts float64 to int.

func Float64ToInt16

func Float64ToInt16(v float64) (int16, error)

Float64ToInt16 converts float64 to int16.

func Float64ToInt16Ptr

func Float64ToInt16Ptr(v float64) (*int16, error)

Float64ToInt16Ptr converts float64 to *int16.

func Float64ToInt32

func Float64ToInt32(v float64) (int32, error)

Float64ToInt32 converts float64 to int32.

func Float64ToInt32Ptr

func Float64ToInt32Ptr(v float64) (*int32, error)

Float64ToInt32Ptr converts float64 to *int32.

func Float64ToInt64

func Float64ToInt64(v float64) (int64, error)

Float64ToInt64 converts float64 to int64.

func Float64ToInt64Ptr

func Float64ToInt64Ptr(v float64) (*int64, error)

Float64ToInt64Ptr converts float64 to *int64.

func Float64ToInt8

func Float64ToInt8(v float64) (int8, error)

Float64ToInt8 converts float64 to int8.

func Float64ToInt8Ptr

func Float64ToInt8Ptr(v float64) (*int8, error)

Float64ToInt8Ptr converts float64 to *int8.

func Float64ToInterface

func Float64ToInterface(v float64) interface{}

Float64ToInterface converts float64 to interface.

func Float64ToInterfacePtr

func Float64ToInterfacePtr(v float64) *interface{}

Float64ToInterfacePtr converts float64 to *interface.

func Float64ToString

func Float64ToString(v float64) string

Float64ToString converts float64 to string.

func Float64ToStringPtr

func Float64ToStringPtr(v float64) *string

Float64ToStringPtr converts float64 to *string.

func Float64ToUint

func Float64ToUint(v float64) (uint, error)

Float64ToUint converts float64 to uint.

func Float64ToUint16

func Float64ToUint16(v float64) (uint16, error)

Float64ToUint16 converts float64 to uint16.

func Float64ToUint16Ptr

func Float64ToUint16Ptr(v float64) (*uint16, error)

Float64ToUint16Ptr converts float64 to *uint16.

func Float64ToUint32

func Float64ToUint32(v float64) (uint32, error)

Float64ToUint32 converts float64 to uint32.

func Float64ToUint32Ptr

func Float64ToUint32Ptr(v float64) (*uint32, error)

Float64ToUint32Ptr converts float64 to *uint32.

func Float64ToUint64

func Float64ToUint64(v float64) (uint64, error)

Float64ToUint64 converts float64 to uint64.

func Float64ToUint64Ptr

func Float64ToUint64Ptr(v float64) (*uint64, error)

Float64ToUint64Ptr converts float64 to *uint64.

func Float64ToUint8

func Float64ToUint8(v float64) (uint8, error)

Float64ToUint8 converts float64 to uint8.

func Float64ToUint8Ptr

func Float64ToUint8Ptr(v float64) (*uint8, error)

Float64ToUint8Ptr converts float64 to *uint8.

func Float64ToUintPtr

func Float64ToUintPtr(v float64) (*uint, error)

Float64ToUintPtr converts float64 to *uint.

func Float64sCopy

func Float64sCopy(f []float64) []float64

Float64sCopy creates a copy of the float64 slice.

func Float64sCopyWithin

func Float64sCopyWithin(f []float64, target, start int, end ...int)

Float64sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Float64sDistinct

func Float64sDistinct(f *[]float64, changeSlice bool) (distinctCount map[float64]int)

Float64sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Float64sEvery

func Float64sEvery(f []float64, fn func(f []float64, k int, v float64) bool) bool

Float64sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Float64sFill

func Float64sFill(f []float64, value float64, start int, end ...int)

Float64sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Float64sFilter

func Float64sFilter(f []float64, fn func(f []float64, k int, v float64) bool) []float64

Float64sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Float64sFind

func Float64sFind(f []float64, fn func(f []float64, k int, v float64) bool) (k int, v float64)

Float64sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Float64sIncludes

func Float64sIncludes(f []float64, valueToFind float64, fromIndex ...int) bool

Float64sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Float64sIndexOf

func Float64sIndexOf(f []float64, searchElement float64, fromIndex ...int) int

Float64sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Float64sIntersect

func Float64sIntersect(f ...[]float64) (intersectCount map[float64]int)

Float64sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Float64sLastIndexOf

func Float64sLastIndexOf(f []float64, searchElement float64, fromIndex ...int) int

Float64sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Float64sMap

func Float64sMap(f []float64, fn func(f []float64, k int, v float64) float64) []float64

Float64sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Float64sPop

func Float64sPop(f *[]float64) (float64, bool)

Float64sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Float64sPush

func Float64sPush(f *[]float64, element ...float64) int

Float64sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Float64sPushDistinct

func Float64sPushDistinct(f []float64, element ...float64) []float64

Float64sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Float64sReduce

func Float64sReduce(
	f []float64,
	fn func(f []float64, k int, v, accumulator float64) float64, initialValue ...float64,
) float64

Float64sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Float64sReduceRight

func Float64sReduceRight(
	f []float64,
	fn func(f []float64, k int, v, accumulator float64) float64, initialValue ...float64,
) float64

Float64sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Float64sRemoveEvery

func Float64sRemoveEvery(p *[]float64, elements ...float64) int

Float64sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Float64sRemoveFirst

func Float64sRemoveFirst(p *[]float64, elements ...float64) int

Float64sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Float64sReverse

func Float64sReverse(f []float64)

Float64sReverse reverses an slice in place.

func Float64sShift

func Float64sShift(f *[]float64) (float64, bool)

Float64sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Float64sSlice

func Float64sSlice(f []float64, begin int, end ...int) []float64

Float64sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Float64sSome

func Float64sSome(f []float64, fn func(f []float64, k int, v float64) bool) bool

Float64sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Float64sSplice

func Float64sSplice(f *[]float64, start, deleteCount int, items ...float64)

Float64sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Float64sToBools

func Float64sToBools(f []float64) []bool

Float64sToBools converts float64 slice to bool slice. NOTE:

0 is false, everything else is true

func Float64sToFloat32s

func Float64sToFloat32s(f []float64) ([]float32, error)

Float64sToFloat32s converts float64 slice to float32 slice.

func Float64sToInt16s

func Float64sToInt16s(f []float64) ([]int16, error)

Float64sToInt16s converts float64 slice to int16 slice.

func Float64sToInt32s

func Float64sToInt32s(f []float64) ([]int32, error)

Float64sToInt32s converts float64 slice to int32 slice.

func Float64sToInt64s

func Float64sToInt64s(f []float64) ([]int64, error)

Float64sToInt64s converts float64 slice to int64 slice.

func Float64sToInt8s

func Float64sToInt8s(f []float64) ([]int8, error)

Float64sToInt8s converts float64 slice to int8 slice.

func Float64sToInterfaces

func Float64sToInterfaces(f []float64) []interface{}

Float64sToInterfaces converts float64 slice to interface slice.

func Float64sToInts

func Float64sToInts(f []float64) ([]int, error)

Float64sToInts converts float64 slice to int slice.

func Float64sToStrings

func Float64sToStrings(f []float64) []string

Float64sToStrings converts float64 slice to string slice.

func Float64sToUint16s

func Float64sToUint16s(f []float64) ([]uint16, error)

Float64sToUint16s converts float64 slice to uint16 slice.

func Float64sToUint32s

func Float64sToUint32s(f []float64) ([]uint32, error)

Float64sToUint32s converts float64 slice to uint32 slice.

func Float64sToUint64s

func Float64sToUint64s(f []float64) ([]uint64, error)

Float64sToUint64s converts float64 slice to uint64 slice.

func Float64sToUint8s

func Float64sToUint8s(f []float64) ([]uint8, error)

Float64sToUint8s converts float64 slice to uint8 slice.

func Float64sToUints

func Float64sToUints(f []float64) ([]uint, error)

Float64sToUints converts float64 slice to uint slice.

func Float64sUnshift

func Float64sUnshift(f *[]float64, element ...float64) int

Float64sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Float64sUnshiftDistinct

func Float64sUnshiftDistinct(f *[]float64, element ...float64) int

Float64sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func FormatInt

func FormatInt(i int64, base int) string

FormatInt returns the string representation of i in the given base, for 2 <= base <= 62. NOTE:

Compatible with standard package strconv.

func FormatUint

func FormatUint(i uint64, base int) string

FormatUint returns the string representation of i in the given base, for 2 <= base <= 62. NOTE:

Compatible with standard package strconv.

func FormatUintByDict

func FormatUintByDict(dict []byte, num uint64) string

FormatUintByDict convert num into corresponding string according to dict.

func IndirectValue

func IndirectValue(v reflect.Value) reflect.Value

IndirectValue gets the indirect value.

func InitBool

func InitBool(p *bool, def bool) (done bool)

InitBool initializes false bool pointer with def.

func InitByte

func InitByte(p *byte, def byte) (done bool)

InitByte initializes zero byte pointer with def.

func InitFloat32

func InitFloat32(p *float32, def float32) (done bool)

InitFloat32 initializes zero float32 pointer with def.

func InitFloat64

func InitFloat64(p *float64, def float64) (done bool)

InitFloat64 initializes zero float64 pointer with def.

func InitInt

func InitInt(p *int, def int) (done bool)

InitInt initializes zero int pointer with def.

func InitInt16

func InitInt16(p *int16, def int16) (done bool)

InitInt16 initializes zero int16 pointer with def.

func InitInt32

func InitInt32(p *int32, def int32) (done bool)

InitInt32 initializes zero int32 pointer with def.

func InitInt64

func InitInt64(p *int64, def int64) (done bool)

InitInt64 initializes zero int64 pointer with def.

func InitInt8

func InitInt8(p *int8, def int8) (done bool)

InitInt8 initializes zero int8 pointer with def.

func InitPointer

func InitPointer(v reflect.Value) (done bool)

InitPointer initializes nil pointer with zero value.

func InitSampleValue

func InitSampleValue(t reflect.Type, maxNestingDeep int) reflect.Value

InitSampleValue initialize the given type with some non-zero value( "?", $max_number, 0.1, true)

func InitString

func InitString(p *string, def string) (done bool)

InitString initializes empty string pointer with def.

func InitUint

func InitUint(p *uint, def uint) (done bool)

InitUint initializes zero uint pointer with def.

func InitUint16

func InitUint16(p *uint16, def uint16) (done bool)

InitUint16 initializes zero uint16 pointer with def.

func InitUint32

func InitUint32(p *uint32, def uint32) (done bool)

InitUint32 initializes zero uint32 pointer with def.

func InitUint64

func InitUint64(p *uint64, def uint64) (done bool)

InitUint64 initializes zero uint64 pointer with def.

func InitUint8

func InitUint8(p *uint8, def uint8) (done bool)

InitUint8 initializes zero uint8 pointer with def.

func Int16SetDifference

func Int16SetDifference(set1, set2 []int16, others ...[]int16) []int16

Int16SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Int16SetIntersect

func Int16SetIntersect(set1, set2 []int16, others ...[]int16) []int16

Int16SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Int16SetUnion

func Int16SetUnion(set1, set2 []int16, others ...[]int16) []int16

Int16SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Int16ToBool

func Int16ToBool(v int16) bool

Int16ToBool converts int16 to bool.

func Int16ToBoolPtr

func Int16ToBoolPtr(v int16) *bool

Int16ToBoolPtr converts int16 to *bool.

func Int16ToFloat32

func Int16ToFloat32(v int16) float32

Int16ToFloat32 converts int16 to float32.

func Int16ToFloat32Ptr

func Int16ToFloat32Ptr(v int16) *float32

Int16ToFloat32Ptr converts int16 to *float32.

func Int16ToFloat64

func Int16ToFloat64(v int16) float64

Int16ToFloat64 converts int16 to float64.

func Int16ToFloat64Ptr

func Int16ToFloat64Ptr(v int16) *float64

Int16ToFloat64Ptr converts int16 to *float64.

func Int16ToInt

func Int16ToInt(v int16) int

Int16ToInt converts int16 to int.

func Int16ToInt16Ptr

func Int16ToInt16Ptr(v int16) *int16

Int16ToInt16Ptr converts int16 to *int16.

func Int16ToInt32

func Int16ToInt32(v int16) int32

Int16ToInt32 converts int16 to int32.

func Int16ToInt32Ptr

func Int16ToInt32Ptr(v int16) *int32

Int16ToInt32Ptr converts int16 to *int32.

func Int16ToInt64

func Int16ToInt64(v int16) int64

Int16ToInt64 converts int16 to int64.

func Int16ToInt64Ptr

func Int16ToInt64Ptr(v int16) *int64

Int16ToInt64Ptr converts int16 to *int64.

func Int16ToInt8

func Int16ToInt8(v int16) (int8, error)

Int16ToInt8 converts int16 to int8.

func Int16ToInt8Ptr

func Int16ToInt8Ptr(v int16) (*int8, error)

Int16ToInt8Ptr converts int16 to *int8.

func Int16ToIntPtr

func Int16ToIntPtr(v int16) *int

Int16ToIntPtr converts int16 to *int.

func Int16ToInterface

func Int16ToInterface(v int16) interface{}

Int16ToInterface converts int16 to interface.

func Int16ToInterfacePtr

func Int16ToInterfacePtr(v int16) *interface{}

Int16ToInterfacePtr converts int16 to *interface.

func Int16ToString

func Int16ToString(v int16) string

Int16ToString converts int16 to string.

func Int16ToStringPtr

func Int16ToStringPtr(v int16) *string

Int16ToStringPtr converts int16 to *string.

func Int16ToUint

func Int16ToUint(v int16) (uint, error)

Int16ToUint converts int16 to uint.

func Int16ToUint16

func Int16ToUint16(v int16) (uint16, error)

Int16ToUint16 converts int16 to uint16.

func Int16ToUint16Ptr

func Int16ToUint16Ptr(v int16) (*uint16, error)

Int16ToUint16Ptr converts int16 to *uint16.

func Int16ToUint32

func Int16ToUint32(v int16) (uint32, error)

Int16ToUint32 converts int16 to uint32.

func Int16ToUint32Ptr

func Int16ToUint32Ptr(v int16) (*uint32, error)

Int16ToUint32Ptr converts int16 to *uint32.

func Int16ToUint64

func Int16ToUint64(v int16) (uint64, error)

Int16ToUint64 converts int16 to uint64.

func Int16ToUint64Ptr

func Int16ToUint64Ptr(v int16) (*uint64, error)

Int16ToUint64Ptr converts int16 to *uint64.

func Int16ToUint8

func Int16ToUint8(v int16) (uint8, error)

Int16ToUint8 converts int16 to uint8.

func Int16ToUint8Ptr

func Int16ToUint8Ptr(v int16) (*uint8, error)

Int16ToUint8Ptr converts int16 to *uint8.

func Int16ToUintPtr

func Int16ToUintPtr(v int16) (*uint, error)

Int16ToUintPtr converts int16 to *uint.

func Int16sConcat

func Int16sConcat(i ...[]int16) []int16

Int16sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Int16sCopy

func Int16sCopy(i []int16) []int16

Int16sCopy creates a copy of the int16 slice.

func Int16sCopyWithin

func Int16sCopyWithin(i []int16, target, start int, end ...int)

Int16sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int16sDistinct

func Int16sDistinct(i *[]int16, changeSlice bool) (distinctCount map[int16]int)

Int16sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Int16sEvery

func Int16sEvery(i []int16, fn func(i []int16, k int, v int16) bool) bool

Int16sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Int16sFill

func Int16sFill(i []int16, value int16, start int, end ...int)

Int16sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int16sFilter

func Int16sFilter(i []int16, fn func(i []int16, k int, v int16) bool) []int16

Int16sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Int16sFind

func Int16sFind(i []int16, fn func(i []int16, k int, v int16) bool) (k int, v int16)

Int16sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Int16sIncludes

func Int16sIncludes(i []int16, valueToFind int16, fromIndex ...int) bool

Int16sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Int16sIndexOf

func Int16sIndexOf(i []int16, searchElement int16, fromIndex ...int) int

Int16sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int16sIntersect

func Int16sIntersect(i ...[]int16) (intersectCount map[int16]int)

Int16sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Int16sLastIndexOf

func Int16sLastIndexOf(i []int16, searchElement int16, fromIndex ...int) int

Int16sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int16sMap

func Int16sMap(i []int16, fn func(i []int16, k int, v int16) int16) []int16

Int16sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Int16sPop

func Int16sPop(i *[]int16) (int16, bool)

Int16sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Int16sPush

func Int16sPush(i *[]int16, element ...int16) int

Int16sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Int16sPushDistinct

func Int16sPushDistinct(i []int16, element ...int16) []int16

Int16sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Int16sReduce

func Int16sReduce(i []int16,
	fn func(i []int16, k int, v, accumulator int16) int16, initialValue ...int16,
) int16

Int16sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int16sReduceRight

func Int16sReduceRight(i []int16,
	fn func(i []int16, k int, v, accumulator int16) int16, initialValue ...int16,
) int16

Int16sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int16sRemoveEvery

func Int16sRemoveEvery(p *[]int16, elements ...int16) int

Int16sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Int16sRemoveFirst

func Int16sRemoveFirst(p *[]int16, elements ...int16) int

Int16sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Int16sReverse

func Int16sReverse(i []int16)

Int16sReverse reverses an slice in place.

func Int16sShift

func Int16sShift(i *[]int16) (int16, bool)

Int16sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Int16sSlice

func Int16sSlice(i []int16, begin int, end ...int) []int16

Int16sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Int16sSome

func Int16sSome(i []int16, fn func(i []int16, k int, v int16) bool) bool

Int16sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Int16sSplice

func Int16sSplice(i *[]int16, start, deleteCount int, items ...int16)

Int16sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Int16sToBools

func Int16sToBools(i []int16) []bool

Int16sToBools converts int16 slice to bool slice. NOTE:

0 is false, everything else is true

func Int16sToFloat32s

func Int16sToFloat32s(i []int16) []float32

Int16sToFloat32s converts int16 slice to float32 slice.

func Int16sToFloat64s

func Int16sToFloat64s(i []int16) []float64

Int16sToFloat64s converts int16 slice to float64 slice.

func Int16sToInt32s

func Int16sToInt32s(i []int16) []int32

Int16sToInt32s converts int16 slice to int32 slice.

func Int16sToInt64s

func Int16sToInt64s(i []int16) []int64

Int16sToInt64s converts int16 slice to int64 slice.

func Int16sToInt8s

func Int16sToInt8s(i []int16) ([]int8, error)

Int16sToInt8s converts int16 slice to int8 slice.

func Int16sToInterfaces

func Int16sToInterfaces(i []int16) []interface{}

Int16sToInterfaces converts int16 slice to interface slice.

func Int16sToInts

func Int16sToInts(i []int16) []int

Int16sToInts converts int16 slice to int slice.

func Int16sToStrings

func Int16sToStrings(i []int16) []string

Int16sToStrings converts int16 slice to string slice.

func Int16sToUint16s

func Int16sToUint16s(i []int16) ([]uint16, error)

Int16sToUint16s converts int16 slice to uint16 slice.

func Int16sToUint32s

func Int16sToUint32s(i []int16) ([]uint32, error)

Int16sToUint32s converts int16 slice to uint32 slice.

func Int16sToUint64s

func Int16sToUint64s(i []int16) ([]uint64, error)

Int16sToUint64s converts int16 slice to uint64 slice.

func Int16sToUint8s

func Int16sToUint8s(i []int16) ([]uint8, error)

Int16sToUint8s converts int16 slice to uint8 slice.

func Int16sToUints

func Int16sToUints(i []int16) ([]uint, error)

Int16sToUints converts int16 slice to uint slice.

func Int16sUnshift

func Int16sUnshift(i *[]int16, element ...int16) int

Int16sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Int16sUnshiftDistinct

func Int16sUnshiftDistinct(i *[]int16, element ...int16) int

Int16sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Int32SetDifference

func Int32SetDifference(set1, set2 []int32, others ...[]int32) []int32

Int32SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Int32SetIntersect

func Int32SetIntersect(set1, set2 []int32, others ...[]int32) []int32

Int32SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Int32SetUnion

func Int32SetUnion(set1, set2 []int32, others ...[]int32) []int32

Int32SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Int32ToBool

func Int32ToBool(v int32) bool

Int32ToBool converts int32 to bool.

func Int32ToBoolPtr

func Int32ToBoolPtr(v int32) *bool

Int32ToBoolPtr converts int32 to *bool.

func Int32ToFloat32

func Int32ToFloat32(v int32) float32

Int32ToFloat32 converts int32 to float32.

func Int32ToFloat32Ptr

func Int32ToFloat32Ptr(v int32) *float32

Int32ToFloat32Ptr converts int32 to *float32.

func Int32ToFloat64

func Int32ToFloat64(v int32) float64

Int32ToFloat64 converts int32 to float64.

func Int32ToFloat64Ptr

func Int32ToFloat64Ptr(v int32) *float64

Int32ToFloat64Ptr converts int32 to *float64.

func Int32ToInt

func Int32ToInt(v int32) int

Int32ToInt converts int32 to int.

func Int32ToInt16

func Int32ToInt16(v int32) (int16, error)

Int32ToInt16 converts int32 to int16.

func Int32ToInt16Ptr

func Int32ToInt16Ptr(v int32) (*int16, error)

Int32ToInt16Ptr converts int32 to *int16.

func Int32ToInt32Ptr

func Int32ToInt32Ptr(v int32) *int32

Int32ToInt32Ptr converts int32 to *int32.

func Int32ToInt64

func Int32ToInt64(v int32) int64

Int32ToInt64 converts int32 to int64.

func Int32ToInt64Ptr

func Int32ToInt64Ptr(v int32) *int64

Int32ToInt64Ptr converts int32 to *int64.

func Int32ToInt8

func Int32ToInt8(v int32) (int8, error)

Int32ToInt8 converts int32 to int8.

func Int32ToInt8Ptr

func Int32ToInt8Ptr(v int32) (*int8, error)

Int32ToInt8Ptr converts int32 to *int8.

func Int32ToIntPtr

func Int32ToIntPtr(v int32) *int

Int32ToIntPtr converts int32 to *int.

func Int32ToInterface

func Int32ToInterface(v int32) interface{}

Int32ToInterface converts int32 to interface.

func Int32ToInterfacePtr

func Int32ToInterfacePtr(v int32) *interface{}

Int32ToInterfacePtr converts int32 to *interface.

func Int32ToString

func Int32ToString(v int32) string

Int32ToString converts int32 to string.

func Int32ToStringPtr

func Int32ToStringPtr(v int32) *string

Int32ToStringPtr converts int32 to *string.

func Int32ToUint

func Int32ToUint(v int32) (uint, error)

Int32ToUint converts int32 to uint.

func Int32ToUint16

func Int32ToUint16(v int32) (uint16, error)

Int32ToUint16 converts int32 to uint16.

func Int32ToUint16Ptr

func Int32ToUint16Ptr(v int32) (*uint16, error)

Int32ToUint16Ptr converts int32 to *uint16.

func Int32ToUint32

func Int32ToUint32(v int32) (uint32, error)

Int32ToUint32 converts int32 to uint32.

func Int32ToUint32Ptr

func Int32ToUint32Ptr(v int32) (*uint32, error)

Int32ToUint32Ptr converts int32 to *uint32.

func Int32ToUint64

func Int32ToUint64(v int32) (uint64, error)

Int32ToUint64 converts int32 to uint64.

func Int32ToUint64Ptr

func Int32ToUint64Ptr(v int32) (*uint64, error)

Int32ToUint64Ptr converts int32 to *uint64.

func Int32ToUint8

func Int32ToUint8(v int32) (uint8, error)

Int32ToUint8 converts int32 to uint8.

func Int32ToUint8Ptr

func Int32ToUint8Ptr(v int32) (*uint8, error)

Int32ToUint8Ptr converts int32 to *uint8.

func Int32ToUintPtr

func Int32ToUintPtr(v int32) (*uint, error)

Int32ToUintPtr converts int32 to *uint.

func Int32sConcat

func Int32sConcat(i ...[]int32) []int32

Int32sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Int32sCopy

func Int32sCopy(i []int32) []int32

Int32sCopy creates a copy of the int32 slice.

func Int32sCopyWithin

func Int32sCopyWithin(i []int32, target, start int, end ...int)

Int32sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int32sDistinct

func Int32sDistinct(i *[]int32, changeSlice bool) (distinctCount map[int32]int)

Int32sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Int32sEvery

func Int32sEvery(i []int32, fn func(i []int32, k int, v int32) bool) bool

Int32sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Int32sFill

func Int32sFill(i []int32, value int32, start int, end ...int)

Int32sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int32sFilter

func Int32sFilter(i []int32, fn func(i []int32, k int, v int32) bool) []int32

Int32sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Int32sFind

func Int32sFind(i []int32, fn func(i []int32, k int, v int32) bool) (k int, v int32)

Int32sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Int32sIncludes

func Int32sIncludes(i []int32, valueToFind int32, fromIndex ...int) bool

Int32sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Int32sIndexOf

func Int32sIndexOf(i []int32, searchElement int32, fromIndex ...int) int

Int32sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int32sIntersect

func Int32sIntersect(i ...[]int32) (intersectCount map[int32]int)

Int32sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Int32sLastIndexOf

func Int32sLastIndexOf(i []int32, searchElement int32, fromIndex ...int) int

Int32sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int32sMap

func Int32sMap(i []int32, fn func(i []int32, k int, v int32) int32) []int32

Int32sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Int32sPop

func Int32sPop(i *[]int32) (int32, bool)

Int32sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Int32sPush

func Int32sPush(i *[]int32, element ...int32) int

Int32sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Int32sPushDistinct

func Int32sPushDistinct(i []int32, element ...int32) []int32

Int32sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Int32sReduce

func Int32sReduce(i []int32,
	fn func(i []int32, k int, v, accumulator int32) int32, initialValue ...int32,
) int32

Int32sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int32sReduceRight

func Int32sReduceRight(i []int32,
	fn func(i []int32, k int, v, accumulator int32) int32, initialValue ...int32,
) int32

Int32sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int32sRemoveEvery

func Int32sRemoveEvery(p *[]int32, elements ...int32) int

Int32sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Int32sRemoveFirst

func Int32sRemoveFirst(p *[]int32, elements ...int32) int

Int32sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Int32sReverse

func Int32sReverse(i []int32)

Int32sReverse reverses an slice in place.

func Int32sShift

func Int32sShift(i *[]int32) (int32, bool)

Int32sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Int32sSlice

func Int32sSlice(i []int32, begin int, end ...int) []int32

Int32sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Int32sSome

func Int32sSome(i []int32, fn func(i []int32, k int, v int32) bool) bool

Int32sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Int32sSplice

func Int32sSplice(i *[]int32, start, deleteCount int, items ...int32)

Int32sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Int32sToBools

func Int32sToBools(i []int32) []bool

Int32sToBools converts int32 slice to bool slice. NOTE:

0 is false, everything else is true

func Int32sToFloat32s

func Int32sToFloat32s(i []int32) []float32

Int32sToFloat32s converts int32 slice to float32 slice.

func Int32sToFloat64s

func Int32sToFloat64s(i []int32) []float64

Int32sToFloat64s converts int32 slice to float64 slice.

func Int32sToInt16s

func Int32sToInt16s(i []int32) ([]int16, error)

Int32sToInt16s converts int32 slice to int16 slice.

func Int32sToInt64s

func Int32sToInt64s(i []int32) []int64

Int32sToInt64s converts int32 slice to int64 slice.

func Int32sToInt8s

func Int32sToInt8s(i []int32) ([]int8, error)

Int32sToInt8s converts int32 slice to int8 slice.

func Int32sToInterfaces

func Int32sToInterfaces(i []int32) []interface{}

Int32sToInterfaces converts int32 slice to interface slice.

func Int32sToInts

func Int32sToInts(i []int32) []int

Int32sToInts converts int32 slice to int slice.

func Int32sToStrings

func Int32sToStrings(i []int32) []string

Int32sToStrings converts int32 slice to string slice.

func Int32sToUint16s

func Int32sToUint16s(i []int32) ([]uint16, error)

Int32sToUint16s converts int32 slice to uint16 slice.

func Int32sToUint32s

func Int32sToUint32s(i []int32) ([]uint32, error)

Int32sToUint32s converts int32 slice to uint32 slice.

func Int32sToUint64s

func Int32sToUint64s(i []int32) ([]uint64, error)

Int32sToUint64s converts int32 slice to uint64 slice.

func Int32sToUint8s

func Int32sToUint8s(i []int32) ([]uint8, error)

Int32sToUint8s converts int32 slice to uint8 slice.

func Int32sToUints

func Int32sToUints(i []int32) ([]uint, error)

Int32sToUints converts int32 slice to uint slice.

func Int32sUnshift

func Int32sUnshift(i *[]int32, element ...int32) int

Int32sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Int32sUnshiftDistinct

func Int32sUnshiftDistinct(i *[]int32, element ...int32) int

Int32sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Int64SetDifference

func Int64SetDifference(set1, set2 []int64, others ...[]int64) []int64

Int64SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Int64SetIntersect

func Int64SetIntersect(set1, set2 []int64, others ...[]int64) []int64

Int64SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Int64SetUnion

func Int64SetUnion(set1, set2 []int64, others ...[]int64) []int64

Int64SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Int64ToBool

func Int64ToBool(v int64) bool

Int64ToBool converts int64 to bool.

func Int64ToBoolPtr

func Int64ToBoolPtr(v int64) *bool

Int64ToBoolPtr converts int64 to *bool.

func Int64ToFloat32

func Int64ToFloat32(v int64) float32

Int64ToFloat32 converts int64 to float32.

func Int64ToFloat32Ptr

func Int64ToFloat32Ptr(v int64) *float32

Int64ToFloat32Ptr converts int64 to *float32.

func Int64ToFloat64

func Int64ToFloat64(v int64) float64

Int64ToFloat64 converts int64 to float64.

func Int64ToFloat64Ptr

func Int64ToFloat64Ptr(v int64) *float64

Int64ToFloat64Ptr converts int64 to *float64.

func Int64ToInt

func Int64ToInt(v int64) (int, error)

Int64ToInt converts int64 to int.

func Int64ToInt16

func Int64ToInt16(v int64) (int16, error)

Int64ToInt16 converts int64 to int16.

func Int64ToInt16Ptr

func Int64ToInt16Ptr(v int64) (*int16, error)

Int64ToInt16Ptr converts int64 to *int16.

func Int64ToInt32

func Int64ToInt32(v int64) (int32, error)

Int64ToInt32 converts int64 to int32.

func Int64ToInt32Ptr

func Int64ToInt32Ptr(v int64) (*int32, error)

Int64ToInt32Ptr converts int64 to *int32.

func Int64ToInt64Ptr

func Int64ToInt64Ptr(v int64) *int64

Int64ToInt64Ptr converts int64 to *int64.

func Int64ToInt8

func Int64ToInt8(v int64) (int8, error)

Int64ToInt8 converts int64 to int8.

func Int64ToInt8Ptr

func Int64ToInt8Ptr(v int64) (*int8, error)

Int64ToInt8Ptr converts int64 to *int8.

func Int64ToIntPtr

func Int64ToIntPtr(v int64) (*int, error)

Int64ToIntPtr converts int64 to *int.

func Int64ToInterface

func Int64ToInterface(v int64) interface{}

Int64ToInterface converts int64 to interface.

func Int64ToInterfacePtr

func Int64ToInterfacePtr(v int64) *interface{}

Int64ToInterfacePtr converts int64 to *interface.

func Int64ToString

func Int64ToString(v int64) string

Int64ToString converts int64 to string.

func Int64ToStringPtr

func Int64ToStringPtr(v int64) *string

Int64ToStringPtr converts int64 to *string.

func Int64ToUint

func Int64ToUint(v int64) (uint, error)

Int64ToUint converts int64 to uint.

func Int64ToUint16

func Int64ToUint16(v int64) (uint16, error)

Int64ToUint16 converts int64 to uint16.

func Int64ToUint16Ptr

func Int64ToUint16Ptr(v int64) (*uint16, error)

Int64ToUint16Ptr converts int64 to *uint16.

func Int64ToUint32

func Int64ToUint32(v int64) (uint32, error)

Int64ToUint32 converts int64 to uint32.

func Int64ToUint32Ptr

func Int64ToUint32Ptr(v int64) (*uint32, error)

Int64ToUint32Ptr converts int64 to *uint32.

func Int64ToUint64

func Int64ToUint64(v int64) (uint64, error)

Int64ToUint64 converts int64 to uint64.

func Int64ToUint64Ptr

func Int64ToUint64Ptr(v int64) (*uint64, error)

Int64ToUint64Ptr converts int64 to *uint64.

func Int64ToUint8

func Int64ToUint8(v int64) (uint8, error)

Int64ToUint8 converts int64 to uint8.

func Int64ToUint8Ptr

func Int64ToUint8Ptr(v int64) (*uint8, error)

Int64ToUint8Ptr converts int64 to *uint8.

func Int64ToUintPtr

func Int64ToUintPtr(v int64) (*uint, error)

Int64ToUintPtr converts int64 to *uint.

func Int64sConcat

func Int64sConcat(i ...[]int64) []int64

Int64sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Int64sCopy

func Int64sCopy(i []int64) []int64

Int64sCopy creates a copy of the int64 slice.

func Int64sCopyWithin

func Int64sCopyWithin(i []int64, target, start int, end ...int)

Int64sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int64sDistinct

func Int64sDistinct(i *[]int64, changeSlice bool) (distinctCount map[int64]int)

Int64sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Int64sEvery

func Int64sEvery(i []int64, fn func(i []int64, k int, v int64) bool) bool

Int64sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Int64sFill

func Int64sFill(i []int64, value int64, start int, end ...int)

Int64sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int64sFilter

func Int64sFilter(i []int64, fn func(i []int64, k int, v int64) bool) []int64

Int64sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Int64sFind

func Int64sFind(i []int64, fn func(i []int64, k int, v int64) bool) (k int, v int64)

Int64sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Int64sIncludes

func Int64sIncludes(i []int64, valueToFind int64, fromIndex ...int) bool

Int64sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Int64sIndexOf

func Int64sIndexOf(i []int64, searchElement int64, fromIndex ...int) int

Int64sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int64sIntersect

func Int64sIntersect(i ...[]int64) (intersectCount map[int64]int)

Int64sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Int64sLastIndexOf

func Int64sLastIndexOf(i []int64, searchElement int64, fromIndex ...int) int

Int64sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int64sMap

func Int64sMap(i []int64, fn func(i []int64, k int, v int64) int64) []int64

Int64sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Int64sPop

func Int64sPop(i *[]int64) (int64, bool)

Int64sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Int64sPush

func Int64sPush(i *[]int64, element ...int64) int

Int64sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Int64sPushDistinct

func Int64sPushDistinct(i []int64, element ...int64) []int64

Int64sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Int64sReduce

func Int64sReduce(
	i []int64,
	fn func(i []int64, k int, v, accumulator int64) int64, initialValue ...int64,
) int64

Int64sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int64sReduceRight

func Int64sReduceRight(
	i []int64,
	fn func(i []int64, k int, v, accumulator int64) int64, initialValue ...int64,
) int64

Int64sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int64sRemoveEvery

func Int64sRemoveEvery(p *[]int64, elements ...int64) int

Int64sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Int64sRemoveFirst

func Int64sRemoveFirst(p *[]int64, elements ...int64) int

Int64sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Int64sReverse

func Int64sReverse(i []int64)

Int64sReverse reverses an slice in place.

func Int64sShift

func Int64sShift(i *[]int64) (int64, bool)

Int64sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Int64sSlice

func Int64sSlice(i []int64, begin int, end ...int) []int64

Int64sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Int64sSome

func Int64sSome(i []int64, fn func(i []int64, k int, v int64) bool) bool

Int64sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Int64sSplice

func Int64sSplice(i *[]int64, start, deleteCount int, items ...int64)

Int64sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Int64sToBools

func Int64sToBools(i []int64) []bool

Int64sToBools converts int64 slice to bool slice. NOTE:

0 is false, everything else is true

func Int64sToFloat32s

func Int64sToFloat32s(i []int64) []float32

Int64sToFloat32s converts int64 slice to float32 slice.

func Int64sToFloat64s

func Int64sToFloat64s(i []int64) []float64

Int64sToFloat64s converts int64 slice to float64 slice.

func Int64sToInt16s

func Int64sToInt16s(i []int64) ([]int16, error)

Int64sToInt16s converts int64 slice to int16 slice.

func Int64sToInt32s

func Int64sToInt32s(i []int64) ([]int32, error)

Int64sToInt32s converts int64 slice to int32 slice.

func Int64sToInt8s

func Int64sToInt8s(i []int64) ([]int8, error)

Int64sToInt8s converts int64 slice to int8 slice.

func Int64sToInterfaces

func Int64sToInterfaces(i []int64) []interface{}

Int64sToInterfaces converts int64 slice to interface slice.

func Int64sToInts

func Int64sToInts(i []int64) ([]int, error)

Int64sToInts converts int64 slice to int slice.

func Int64sToStrings

func Int64sToStrings(i []int64) []string

Int64sToStrings converts int64 slice to string slice.

func Int64sToUint16s

func Int64sToUint16s(i []int64) ([]uint16, error)

Int64sToUint16s converts int64 slice to uint16 slice.

func Int64sToUint32s

func Int64sToUint32s(i []int64) ([]uint32, error)

Int64sToUint32s converts int64 slice to uint32 slice.

func Int64sToUint64s

func Int64sToUint64s(i []int64) ([]uint64, error)

Int64sToUint64s converts int64 slice to uint64 slice.

func Int64sToUint8s

func Int64sToUint8s(i []int64) ([]uint8, error)

Int64sToUint8s converts int64 slice to uint8 slice.

func Int64sToUints

func Int64sToUints(i []int64) ([]uint, error)

Int64sToUints converts int64 slice to uint slice.

func Int64sUnshift

func Int64sUnshift(i *[]int64, element ...int64) int

Int64sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Int64sUnshiftDistinct

func Int64sUnshiftDistinct(i *[]int64, element ...int64) int

Int64sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Int8SetDifference

func Int8SetDifference(set1, set2 []int8, others ...[]int8) []int8

Int8SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Int8SetIntersect

func Int8SetIntersect(set1, set2 []int8, others ...[]int8) []int8

Int8SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Int8SetUnion

func Int8SetUnion(set1, set2 []int8, others ...[]int8) []int8

Int8SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Int8ToBool

func Int8ToBool(v int8) bool

Int8ToBool converts int8 to bool.

func Int8ToBoolPtr

func Int8ToBoolPtr(v int8) *bool

Int8ToBoolPtr converts int8 to *bool.

func Int8ToFloat32

func Int8ToFloat32(v int8) float32

Int8ToFloat32 converts int8 to float32.

func Int8ToFloat32Ptr

func Int8ToFloat32Ptr(v int8) *float32

Int8ToFloat32Ptr converts int8 to *float32.

func Int8ToFloat64

func Int8ToFloat64(v int8) float64

Int8ToFloat64 converts int8 to float64.

func Int8ToFloat64Ptr

func Int8ToFloat64Ptr(v int8) *float64

Int8ToFloat64Ptr converts int8 to *float64.

func Int8ToInt

func Int8ToInt(v int8) int

Int8ToInt converts int8 to int.

func Int8ToInt16

func Int8ToInt16(v int8) int16

Int8ToInt16 converts int8 to int16.

func Int8ToInt16Ptr

func Int8ToInt16Ptr(v int8) *int16

Int8ToInt16Ptr converts int8 to *int16.

func Int8ToInt32

func Int8ToInt32(v int8) int32

Int8ToInt32 converts int8 to int32.

func Int8ToInt32Ptr

func Int8ToInt32Ptr(v int8) *int32

Int8ToInt32Ptr converts int8 to *int32.

func Int8ToInt64

func Int8ToInt64(v int8) int64

Int8ToInt64 converts int8 to int64.

func Int8ToInt64Ptr

func Int8ToInt64Ptr(v int8) *int64

Int8ToInt64Ptr converts int8 to *int64.

func Int8ToInt8Ptr

func Int8ToInt8Ptr(v int8) *int8

Int8ToInt8Ptr converts int8 to *int8.

func Int8ToIntPtr

func Int8ToIntPtr(v int8) *int

Int8ToIntPtr converts int8 to *int.

func Int8ToInterface

func Int8ToInterface(v int8) interface{}

Int8ToInterface converts int8 to interface.

func Int8ToInterfacePtr

func Int8ToInterfacePtr(v int8) *interface{}

Int8ToInterfacePtr converts int8 to *interface.

func Int8ToString

func Int8ToString(v int8) string

Int8ToString converts int8 to string.

func Int8ToStringPtr

func Int8ToStringPtr(v int8) *string

Int8ToStringPtr converts int8 to *string.

func Int8ToUint

func Int8ToUint(v int8) (uint, error)

Int8ToUint converts int8 to uint.

func Int8ToUint16

func Int8ToUint16(v int8) (uint16, error)

Int8ToUint16 converts int8 to uint16.

func Int8ToUint16Ptr

func Int8ToUint16Ptr(v int8) (*uint16, error)

Int8ToUint16Ptr converts int8 to *uint16.

func Int8ToUint32

func Int8ToUint32(v int8) (uint32, error)

Int8ToUint32 converts int8 to uint32.

func Int8ToUint32Ptr

func Int8ToUint32Ptr(v int8) (*uint32, error)

Int8ToUint32Ptr converts int8 to *uint32.

func Int8ToUint64

func Int8ToUint64(v int8) (uint64, error)

Int8ToUint64 converts int8 to uint64.

func Int8ToUint64Ptr

func Int8ToUint64Ptr(v int8) (*uint64, error)

Int8ToUint64Ptr converts int8 to *uint64.

func Int8ToUint8

func Int8ToUint8(v int8) (uint8, error)

Int8ToUint8 converts int8 to uint8.

func Int8ToUint8Ptr

func Int8ToUint8Ptr(v int8) (*uint8, error)

Int8ToUint8Ptr converts int8 to *uint8.

func Int8ToUintPtr

func Int8ToUintPtr(v int8) (*uint, error)

Int8ToUintPtr converts int8 to *uint.

func Int8sConcat

func Int8sConcat(i ...[]int8) []int8

Int8sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Int8sCopy

func Int8sCopy(i []int8) []int8

Int8sCopy creates a copy of the int8 slice.

func Int8sCopyWithin

func Int8sCopyWithin(i []int8, target, start int, end ...int)

Int8sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int8sDistinct

func Int8sDistinct(i *[]int8, changeSlice bool) (distinctCount map[int8]int)

Int8sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Int8sEvery

func Int8sEvery(i []int8, fn func(i []int8, k int, v int8) bool) bool

Int8sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Int8sFill

func Int8sFill(i []int8, value int8, start int, end ...int)

Int8sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Int8sFilter

func Int8sFilter(i []int8, fn func(i []int8, k int, v int8) bool) []int8

Int8sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Int8sFind

func Int8sFind(i []int8, fn func(i []int8, k int, v int8) bool) (k int, v int8)

Int8sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Int8sIncludes

func Int8sIncludes(i []int8, valueToFind int8, fromIndex ...int) bool

Int8sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Int8sIndexOf

func Int8sIndexOf(i []int8, searchElement int8, fromIndex ...int) int

Int8sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int8sIntersect

func Int8sIntersect(i ...[]int8) (intersectCount map[int8]int)

Int8sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Int8sInts

func Int8sInts(i []int8) []int

Ints converts int8 slice to int slice.

func Int8sLastIndexOf

func Int8sLastIndexOf(i []int8, searchElement int8, fromIndex ...int) int

Int8sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Int8sMap

func Int8sMap(i []int8, fn func(i []int8, k int, v int8) int8) []int8

Int8sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Int8sPop

func Int8sPop(i *[]int8) (int8, bool)

Int8sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Int8sPush

func Int8sPush(i *[]int8, element ...int8) int

Int8sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Int8sPushDistinct

func Int8sPushDistinct(i []int8, element ...int8) []int8

Int8sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Int8sReduce

func Int8sReduce(i []int8,
	fn func(i []int8, k int, v, accumulator int8) int8, initialValue ...int8,
) int8

Int8sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int8sReduceRight

func Int8sReduceRight(i []int8,
	fn func(i []int8, k int, v, accumulator int8) int8, initialValue ...int8,
) int8

Int8sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Int8sRemoveEvery

func Int8sRemoveEvery(p *[]int8, elements ...int8) int

Int8sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Int8sRemoveFirst

func Int8sRemoveFirst(p *[]int8, elements ...int8) int

Int8sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Int8sReverse

func Int8sReverse(i []int8)

Int8sReverse reverses an slice in place.

func Int8sShift

func Int8sShift(i *[]int8) (int8, bool)

Int8sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Int8sSlice

func Int8sSlice(i []int8, begin int, end ...int) []int8

Int8sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Int8sSome

func Int8sSome(i []int8, fn func(i []int8, k int, v int8) bool) bool

Int8sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Int8sSplice

func Int8sSplice(i *[]int8, start, deleteCount int, items ...int8)

Int8sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Int8sToBools

func Int8sToBools(i []int8) []bool

Int8sToBools converts int8 slice to bool slice. NOTE:

0 is false, everything else is true

func Int8sToFloat32s

func Int8sToFloat32s(i []int8) []float32

Int8sToFloat32s converts int8 slice to float32 slice.

func Int8sToFloat64s

func Int8sToFloat64s(i []int8) []float64

Int8sToFloat64s converts int8 slice to float64 slice.

func Int8sToInt16s

func Int8sToInt16s(i []int8) []int16

Int8sToInt16s converts int8 slice to int16 slice.

func Int8sToInt32s

func Int8sToInt32s(i []int8) []int32

Int8sToInt32s converts int8 slice to int32 slice.

func Int8sToInt64s

func Int8sToInt64s(i []int8) []int64

Int8sToInt64s converts int8 slice to int64 slice.

func Int8sToInterfaces

func Int8sToInterfaces(i []int8) []interface{}

Int8sToInterfaces converts int8 slice to interface slice.

func Int8sToInts

func Int8sToInts(i []int8) []int

Int8sToInts converts int8 slice to int slice.

func Int8sToStrings

func Int8sToStrings(i []int8) []string

Int8sToStrings converts int8 slice to string slice.

func Int8sToUint16s

func Int8sToUint16s(i []int8) ([]uint16, error)

Int8sToUint16s converts int8 slice to uint16 slice.

func Int8sToUint32s

func Int8sToUint32s(i []int8) ([]uint32, error)

Int8sToUint32s converts int8 slice to uint32 slice.

func Int8sToUint64s

func Int8sToUint64s(i []int8) ([]uint64, error)

Int8sToUint64s converts int8 slice to uint64 slice.

func Int8sToUint8s

func Int8sToUint8s(i []int8) ([]uint8, error)

Int8sToUint8s converts int8 slice to uint8 slice.

func Int8sToUints

func Int8sToUints(i []int8) ([]uint, error)

Int8sToUints converts int8 slice to uint slice.

func Int8sUnshift

func Int8sUnshift(i *[]int8, element ...int8) int

Int8sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Int8sUnshiftDistinct

func Int8sUnshiftDistinct(i *[]int8, element ...int8) int

Int8sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func IntSetDifference

func IntSetDifference(set1, set2 []int, others ...[]int) []int

IntSetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func IntSetIntersect

func IntSetIntersect(set1, set2 []int, others ...[]int) []int

IntSetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func IntSetUnion

func IntSetUnion(set1, set2 []int, others ...[]int) []int

IntSetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func IntToBool

func IntToBool(v int) bool

IntToBool converts int to bool.

func IntToBoolPtr

func IntToBoolPtr(v int) *bool

IntToBoolPtr converts int to *bool.

func IntToFloat32

func IntToFloat32(v int) float32

IntToFloat32 converts int to float32.

func IntToFloat32Ptr

func IntToFloat32Ptr(v int) *float32

IntToFloat32Ptr converts int to *float32.

func IntToFloat64

func IntToFloat64(v int) float64

IntToFloat64 converts int to float64.

func IntToFloat64Ptr

func IntToFloat64Ptr(v int) *float64

IntToFloat64Ptr converts int to *float64.

func IntToInt16

func IntToInt16(v int) (int16, error)

IntToInt16 converts int to int16.

func IntToInt16Ptr

func IntToInt16Ptr(v int) (*int16, error)

IntToInt16Ptr converts int to *int16.

func IntToInt32

func IntToInt32(v int) (int32, error)

IntToInt32 converts int to int32.

func IntToInt32Ptr

func IntToInt32Ptr(v int) (*int32, error)

IntToInt32Ptr converts int to *int32.

func IntToInt64

func IntToInt64(v int) int64

IntToInt64 converts int to int64.

func IntToInt64Ptr

func IntToInt64Ptr(v int) *int64

IntToInt64Ptr converts int to *int64.

func IntToInt8

func IntToInt8(v int) (int8, error)

IntToInt8 converts int to int8.

func IntToInt8Ptr

func IntToInt8Ptr(v int) (*int8, error)

IntToInt8Ptr converts int to *int8.

func IntToIntPtr

func IntToIntPtr(v int) *int

IntToIntPtr converts int to *int.

func IntToInterface

func IntToInterface(v int) interface{}

IntToInterface converts int to interface.

func IntToInterfacePtr

func IntToInterfacePtr(v int) *interface{}

IntToInterfacePtr converts int to *interface.

func IntToString

func IntToString(v int) string

IntToString converts int to string.

func IntToStringPtr

func IntToStringPtr(v int) *string

IntToStringPtr converts int to *string.

func IntToUint

func IntToUint(v int) (uint, error)

IntToUint converts int to uint.

func IntToUint16

func IntToUint16(v int) (uint16, error)

IntToUint16 converts int to uint16.

func IntToUint16Ptr

func IntToUint16Ptr(v int) (*uint16, error)

IntToUint16Ptr converts int to *uint16.

func IntToUint32

func IntToUint32(v int) (uint32, error)

IntToUint32 converts int to uint32.

func IntToUint32Ptr

func IntToUint32Ptr(v int) (*uint32, error)

IntToUint32Ptr converts int to *uint32.

func IntToUint64

func IntToUint64(v int) (uint64, error)

IntToUint64 converts int to uint64.

func IntToUint64Ptr

func IntToUint64Ptr(v int) (*uint64, error)

IntToUint64Ptr converts int to *uint64.

func IntToUint8

func IntToUint8(v int) (uint8, error)

IntToUint8 converts int to uint8.

func IntToUint8Ptr

func IntToUint8Ptr(v int) (*uint8, error)

IntToUint8Ptr converts int to *uint8.

func IntToUintPtr

func IntToUintPtr(v int) (*uint, error)

IntToUintPtr converts int to *uint.

func InterfaceToBool

func InterfaceToBool(i interface{}, emptyAsFalse ...bool) (bool, error)

InterfaceToBool converts interface to bool. NOTE:

0 is false, other numbers are true

func InterfaceToBoolPtr

func InterfaceToBoolPtr(i interface{}, emptyAsFalse ...bool) (*bool, error)

InterfaceToBoolPtr converts interface to *bool. NOTE:

0 is false, other numbers are true

func InterfaceToFloat32

func InterfaceToFloat32(i interface{}, emptyStringAsZero ...bool) (float32, error)

InterfaceToFloat32 converts interface to float32.

func InterfaceToFloat32Ptr

func InterfaceToFloat32Ptr(i interface{}, emptyAsFalse ...bool) (*float32, error)

InterfaceToFloat32Ptr converts interface to *float32.

func InterfaceToFloat64

func InterfaceToFloat64(i interface{}, emptyStringAsZero ...bool) (float64, error)

InterfaceToFloat64 converts interface to float64.

func InterfaceToFloat64Ptr

func InterfaceToFloat64Ptr(i interface{}, emptyAsFalse ...bool) (*float64, error)

InterfaceToFloat64Ptr converts interface to *float64.

func InterfaceToInt

func InterfaceToInt(i interface{}, emptyStringAsZero ...bool) (int, error)

InterfaceToInt converts interface to int.

func InterfaceToInt16

func InterfaceToInt16(i interface{}, emptyStringAsZero ...bool) (int16, error)

InterfaceToInt16 converts interface to int16.

func InterfaceToInt16Ptr

func InterfaceToInt16Ptr(i interface{}, emptyAsFalse ...bool) (*int16, error)

InterfaceToInt16Ptr converts interface to *int16.

func InterfaceToInt32

func InterfaceToInt32(i interface{}, emptyStringAsZero ...bool) (int32, error)

InterfaceToInt32 converts interface to int32.

func InterfaceToInt32Ptr

func InterfaceToInt32Ptr(i interface{}, emptyAsFalse ...bool) (*int32, error)

InterfaceToInt32Ptr converts interface to *int32.

func InterfaceToInt64

func InterfaceToInt64(i interface{}, emptyStringAsZero ...bool) (int64, error)

InterfaceToInt64 converts interface to int64.

func InterfaceToInt64Ptr

func InterfaceToInt64Ptr(i interface{}, emptyAsFalse ...bool) (*int64, error)

InterfaceToInt64Ptr converts interface to *int64.

func InterfaceToInt8

func InterfaceToInt8(i interface{}, emptyStringAsZero ...bool) (int8, error)

InterfaceToInt8 converts interface to int8.

func InterfaceToInt8Ptr

func InterfaceToInt8Ptr(i interface{}, emptyAsFalse ...bool) (*int8, error)

InterfaceToInt8Ptr converts interface to *int8.

func InterfaceToIntPtr

func InterfaceToIntPtr(i interface{}, emptyAsFalse ...bool) (*int, error)

InterfaceToIntPtr converts interface to *float64.

func InterfaceToInterfacePtr

func InterfaceToInterfacePtr(i interface{}) *interface{}

InterfaceToInterfacePtr converts interface to *interface.

func InterfaceToString

func InterfaceToString(i interface{}) string

InterfaceToString converts interface to string.

func InterfaceToStringPtr

func InterfaceToStringPtr(i interface{}) *string

InterfaceToStringPtr converts interface to *string.

func InterfaceToUint

func InterfaceToUint(i interface{}, emptyStringAsZero ...bool) (uint, error)

InterfaceToUint converts interface to uint.

func InterfaceToUint16

func InterfaceToUint16(i interface{}, emptyStringAsZero ...bool) (uint16, error)

InterfaceToUint16 converts interface to uint16.

func InterfaceToUint16Ptr

func InterfaceToUint16Ptr(i interface{}, emptyAsFalse ...bool) (*uint16, error)

InterfaceToUint16Ptr converts interface to *uint16.

func InterfaceToUint32

func InterfaceToUint32(i interface{}, emptyStringAsZero ...bool) (uint32, error)

InterfaceToUint32 converts interface to uint32.

func InterfaceToUint32Ptr

func InterfaceToUint32Ptr(i interface{}, emptyAsFalse ...bool) (*uint32, error)

InterfaceToUint32Ptr converts interface to *uint32.

func InterfaceToUint64

func InterfaceToUint64(i interface{}, emptyStringAsZero ...bool) (uint64, error)

InterfaceToUint64 converts interface to uint64.

func InterfaceToUint64Ptr

func InterfaceToUint64Ptr(i interface{}, emptyAsFalse ...bool) (*uint64, error)

InterfaceToUint64Ptr converts interface to *uint64.

func InterfaceToUint8

func InterfaceToUint8(i interface{}, emptyStringAsZero ...bool) (uint8, error)

InterfaceToUint8 converts interface to uint8.

func InterfaceToUint8Ptr

func InterfaceToUint8Ptr(i interface{}, emptyAsFalse ...bool) (*uint8, error)

InterfaceToUint8Ptr converts interface to *uint8.

func InterfaceToUintPtr

func InterfaceToUintPtr(i interface{}, emptyAsFalse ...bool) (*uint, error)

InterfaceToUintPtr converts interface to *uint.

func InterfacesConcat

func InterfacesConcat(i ...[]interface{}) []interface{}

InterfacesConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func InterfacesCopy

func InterfacesCopy(i []interface{}) []interface{}

InterfacesCopy creates a copy of the interface slice.

func InterfacesCopyWithin

func InterfacesCopyWithin(i []interface{}, target, start int, end ...int)

InterfacesCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func InterfacesDistinct

func InterfacesDistinct(i *[]interface{}, changeSlice bool) (distinctCount map[interface{}]int)

InterfacesDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func InterfacesEvery

func InterfacesEvery(i []interface{}, fn func(i []interface{}, k int, v interface{}) bool) bool

InterfacesEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func InterfacesFill

func InterfacesFill(i []interface{}, value []interface{}, start int, end ...int)

InterfacesFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func InterfacesFilter

func InterfacesFilter(i []interface{}, fn func(i []interface{}, k int, v interface{}) bool) []interface{}

InterfacesFilter creates a new slice with all elements that pass the test implemented by the provided function.

func InterfacesFind

func InterfacesFind(i []interface{}, fn func(i []interface{}, k int, v interface{}) bool) (k int, v interface{})

InterfacesFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func InterfacesIncludes

func InterfacesIncludes(i []interface{}, valueToFind int64, fromIndex ...int) bool

InterfacesIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func InterfacesIndexOf

func InterfacesIndexOf(i []interface{}, searchElement int64, fromIndex ...int) int

InterfacesIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func InterfacesIntersect

func InterfacesIntersect(i ...[]interface{}) (intersectCount map[interface{}]int)

InterfacesIntersect calculates intersection of two or more slices, and returns the count of each element.

func InterfacesLastIndexOf

func InterfacesLastIndexOf(i []interface{}, searchElement int64, fromIndex ...int) int

InterfacesLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func InterfacesMap

func InterfacesMap(i []interface{}, fn func(i []interface{}, k int, v interface{}) int64) []int64

InterfacesMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func InterfacesPop

func InterfacesPop(i *[]interface{}) (interface{}, bool)

InterfacesPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func InterfacesPush

func InterfacesPush(i *[]interface{}, element ...interface{}) int

InterfacesPush adds one or more elements to the end of an slice and returns the new length of the slice.

func InterfacesPushDistinct

func InterfacesPushDistinct(i []interface{}, element ...interface{}) []interface{}

InterfacesPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func InterfacesReduce

func InterfacesReduce(
	i []interface{},
	fn func(i []interface{}, k int, v, accumulator interface{}) interface{}, initialValue ...interface{},
) interface{}

InterfacesReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func InterfacesReduceRight

func InterfacesReduceRight(
	i []interface{},
	fn func(i []interface{}, k int, v, accumulator interface{}) interface{}, initialValue ...interface{},
) interface{}

InterfacesReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func InterfacesRemoveEvery

func InterfacesRemoveEvery(p *[]interface{}, elements ...interface{}) int

InterfacesRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func InterfacesRemoveFirst

func InterfacesRemoveFirst(p *[]interface{}, elements ...interface{}) int

InterfacesRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func InterfacesReverse

func InterfacesReverse(i []interface{})

InterfacesReverse reverses an slice in place.

func InterfacesShift

func InterfacesShift(i *[]interface{}) (interface{}, bool)

InterfacesShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func InterfacesSlice

func InterfacesSlice(i []interface{}, begin int, end ...int) []interface{}

InterfacesSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func InterfacesSome

func InterfacesSome(i []interface{}, fn func(i []interface{}, k int, v interface{}) bool) bool

InterfacesSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func InterfacesSplice

func InterfacesSplice(i *[]interface{}, start, deleteCount int, items ...interface{})

InterfacesSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func InterfacesToBools

func InterfacesToBools(i []interface{}) ([]bool, error)

InterfacesToBools converts interface slice to bool slice. NOTE:

0 is false, other numbers are true

func InterfacesToFloat32s

func InterfacesToFloat32s(i []interface{}) ([]float32, error)

InterfacesToFloat32s converts interface slice to float32 slice.

func InterfacesToFloat64s

func InterfacesToFloat64s(i []interface{}) ([]float64, error)

InterfacesToFloat64s converts interface slice to float64 slice.

func InterfacesToInt16s

func InterfacesToInt16s(i []interface{}) ([]int16, error)

InterfacesToInt16s converts interface slice to int16 slice.

func InterfacesToInt32s

func InterfacesToInt32s(i []interface{}) ([]int32, error)

InterfacesToInt32s converts interface slice to int32 slice.

func InterfacesToInt64s

func InterfacesToInt64s(i []interface{}) ([]int64, error)

InterfacesToInt64s converts interface slice to int64 slice.

func InterfacesToInt8s

func InterfacesToInt8s(i []interface{}) ([]int8, error)

InterfacesToInt8s converts interface slice to int8 slice.

func InterfacesToInts

func InterfacesToInts(i []interface{}) ([]int, error)

InterfacesToInts converts interface slice to int slice.

func InterfacesToStrings

func InterfacesToStrings(i []interface{}) []string

InterfacesToStrings converts interface slice to string slice.

func InterfacesToUint16s

func InterfacesToUint16s(i []interface{}) ([]uint16, error)

InterfacesToUint16s converts interface slice to uint16 slice.

func InterfacesToUint32s

func InterfacesToUint32s(i []interface{}) ([]uint32, error)

InterfacesToUint32s converts interface slice to uint32 slice.

func InterfacesToUint64s

func InterfacesToUint64s(i []interface{}) ([]uint64, error)

InterfacesToUint64s converts interface slice to uint64 slice.

func InterfacesToUint8s

func InterfacesToUint8s(i []interface{}) ([]uint8, error)

InterfacesToUint8s converts interface slice to uint8 slice.

func InterfacesToUints

func InterfacesToUints(i []interface{}) ([]uint, error)

InterfacesToUints converts interface slice to uint slice.

func InterfacesUnshift

func InterfacesUnshift(i *[]interface{}, element ...interface{}) int

InterfacesUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func InterfacesUnshiftDistinct

func InterfacesUnshiftDistinct(i *[]interface{}, element ...interface{}) int

InterfacesUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func IntsConcat

func IntsConcat(i ...[]int) []int

IntsConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func IntsCopy

func IntsCopy(i []int) []int

IntsCopy creates a copy of the int slice.

func IntsCopyWithin

func IntsCopyWithin(i []int, target, start int, end ...int)

IntsCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func IntsDistinct

func IntsDistinct(i *[]int, changeSlice bool) (distinctCount map[int]int)

IntsDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func IntsEvery

func IntsEvery(i []int, fn func(i []int, k int, v int) bool) bool

IntsEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func IntsFill

func IntsFill(i []int, value int, start int, end ...int)

IntsFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func IntsFilter

func IntsFilter(i []int, fn func(i []int, k int, v int) bool) []int

IntsFilter creates a new slice with all elements that pass the test implemented by the provided function.

func IntsFind

func IntsFind(i []int, fn func(i []int, k int, v int) bool) (k int, v int)

IntsFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func IntsIncludes

func IntsIncludes(i []int, valueToFind int, fromIndex ...int) bool

IntsIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func IntsIndexOf

func IntsIndexOf(i []int, searchElement int, fromIndex ...int) int

IntsIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func IntsIntersect

func IntsIntersect(i ...[]int) (intersectCount map[int]int)

IntsIntersect calculates intersection of two or more slices, and returns the count of each element.

func IntsLastIndexOf

func IntsLastIndexOf(i []int, searchElement int, fromIndex ...int) int

IntsLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func IntsMap

func IntsMap(i []int, fn func(i []int, k int, v int) int) []int

IntsMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func IntsPop

func IntsPop(i *[]int) (int, bool)

IntsPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func IntsPush

func IntsPush(i *[]int, element ...int) int

IntsPush adds one or more elements to the end of an slice and returns the new length of the slice.

func IntsPushDistinct

func IntsPushDistinct(i []int, element ...int) []int

IntsPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func IntsReduce

func IntsReduce(i []int, fn func(i []int, k int, v, accumulator int) int, initialValue ...int) int

IntsReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func IntsReduceRight

func IntsReduceRight(i []int, fn func(i []int, k int, v, accumulator int) int, initialValue ...int) int

IntsReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func IntsRemoveEvery

func IntsRemoveEvery(p *[]int, elements ...int) int

IntsRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func IntsRemoveFirst

func IntsRemoveFirst(p *[]int, elements ...int) int

IntsRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func IntsReverse

func IntsReverse(i []int)

IntsReverse reverses an slice in place.

func IntsShift

func IntsShift(i *[]int) (int, bool)

IntsShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func IntsSlice

func IntsSlice(i []int, begin int, end ...int) []int

IntsSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func IntsSome

func IntsSome(i []int, fn func(i []int, k int, v int) bool) bool

IntsSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func IntsSplice

func IntsSplice(i *[]int, start, deleteCount int, items ...int)

IntsSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func IntsToBools

func IntsToBools(i []int) []bool

IntsToBools converts int slice to bool slice. NOTE:

0 is false, everything else is true

func IntsToFloat32s

func IntsToFloat32s(i []int) []float32

IntsToFloat32s converts int slice to float32 slice.

func IntsToFloat64s

func IntsToFloat64s(i []int) []float64

IntsToFloat64s converts int slice to float64 slice.

func IntsToInt16s

func IntsToInt16s(i []int) ([]int16, error)

IntsToInt16s converts int slice to int16 slice.

func IntsToInt32s

func IntsToInt32s(i []int) ([]int32, error)

IntsToInt32s converts int slice to int32 slice.

func IntsToInt64s

func IntsToInt64s(i []int) []int64

IntsToInt64s converts int slice to int64 slice.

func IntsToInt8s

func IntsToInt8s(i []int) ([]int8, error)

IntsToInt8s converts int slice to int8 slice.

func IntsToInterfaces

func IntsToInterfaces(i []int) []interface{}

IntsToInterfaces converts int slice to interface slice.

func IntsToStrings

func IntsToStrings(i []int) []string

IntsToStrings converts int slice to string slice.

func IntsToUint16s

func IntsToUint16s(i []int) ([]uint16, error)

IntsToUint16s converts int slice to uint16 slice.

func IntsToUint32s

func IntsToUint32s(i []int) ([]uint32, error)

IntsToUint32s converts int slice to uint32 slice.

func IntsToUint64s

func IntsToUint64s(i []int) ([]uint64, error)

IntsToUint64s converts int slice to uint64 slice.

func IntsToUint8s

func IntsToUint8s(i []int) ([]uint8, error)

IntsToUint8s converts int slice to uint8 slice.

func IntsToUints

func IntsToUints(i []int) ([]uint, error)

IntsToUints converts int slice to uint slice.

func IntsUnshift

func IntsUnshift(i *[]int, element ...int) int

IntsUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func IntsUnshiftDistinct

func IntsUnshiftDistinct(i *[]int, element ...int) int

IntsUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Itoa

func Itoa(i int) string

Itoa is equivalent to FormatInt(int64(i), 10). NOTE:

Compatible with standard package strconv.

func MaxInt

func MaxInt() int

MaxInt returns max int number for current os.

func MaxUint

func MaxUint() uint

MaxUint returns max uint number for current os.

func OneBool

func OneBool(b []bool) bool

OneBool try to return the first element, otherwise return zero value.

func OneFloat32

func OneFloat32(f []float32) float32

OneFloat32 try to return the first element, otherwise return zero value.

func OneFloat64

func OneFloat64(f []float64) float64

OneFloat64 try to return the first element, otherwise return zero value.

func OneInt

func OneInt(i []int) int

OneInt try to return the first element, otherwise return zero value.

func OneInt16

func OneInt16(i []int16) int16

OneInt16 try to return the first element, otherwise return zero value.

func OneInt32

func OneInt32(i []int32) int32

OneInt32 try to return the first element, otherwise return zero value.

func OneInt64

func OneInt64(i []int64) int64

OneInt64 try to return the first element, otherwise return zero value.

func OneInt8

func OneInt8(i []int8) int8

OneInt8 try to return the first element, otherwise return zero value.

func OneInterface

func OneInterface(i []interface{}) interface{}

OneInterface try to return the first element, otherwise return zero value.

func OneString

func OneString(s []string) string

OneString try to return the first element, otherwise return zero value.

func OneUint

func OneUint(u []uint) uint

OneUint try to return the first element, otherwise return zero value.

func OneUint16

func OneUint16(u []uint16) uint16

OneUint16 try to return the first element, otherwise return zero value.

func OneUint32

func OneUint32(u []uint32) uint32

OneUint32 try to return the first element, otherwise return zero value.

func OneUint64

func OneUint64(u []uint64) uint64

OneUint64 try to return the first element, otherwise return zero value.

func OneUint8

func OneUint8(u []uint8) uint8

OneUint8 try to return the first element, otherwise return zero value.

func ParseInt

func ParseInt(s string, base int, bitSize int) (i int64, err error)

ParseInt interprets a string s in the given base (0, 2 to 62) and bit size (0 to 64) and returns the corresponding value i.

If base == 0, the base is implied by the string's prefix: base 2 for "0b", base 8 for "0" or "0o", base 16 for "0x", and base 10 otherwise. Also, for base == 0 only, underscore characters are permitted per the Go integer literal syntax. If base is below 0, is 1, or is above 62, an error is returned.

The bitSize argument specifies the integer type that the result must fit into. Bit sizes 0, 8, 16, 32, and 64 correspond to int, int8, int16, int32, and int64. If bitSize is below 0 or above 64, an error is returned.

The errors that ParseInt returns have concrete type *NumError and include err.Num = s. If s is empty or contains invalid digits, err.Err = ErrSyntax and the returned value is 0; if the value corresponding to s cannot be represented by a signed integer of the given size, err.Err = ErrRange and the returned value is the maximum magnitude integer of the appropriate bitSize and sign. NOTE:

Compatible with standard package strconv.

func ParseUint

func ParseUint(s string, base int, bitSize int) (uint64, error)

ParseUint is like ParseInt but for unsigned numbers. NOTE:

Compatible with standard package strconv.

func ParseUintByDict

func ParseUintByDict(dict []byte, numStr string) (uint64, error)

ParseUintByDict convert numStr into corresponding uint64 according to dict.

func ReferenceSlice

func ReferenceSlice(v reflect.Value, ptrDepth int) reflect.Value

ReferenceSlice convert []T to []*T, the ptrDepth is the count of '*'.

func ReferenceType

func ReferenceType(t reflect.Type, ptrDepth int) reflect.Type

ReferenceType convert T to *T, the ptrDepth is the count of '*'.

func ReferenceValue

func ReferenceValue(v reflect.Value, ptrDepth int) reflect.Value

ReferenceValue convert T to *T, the ptrDepth is the count of '*'.

func RuntimeTypeID

func RuntimeTypeID(t reflect.Type) uintptr

RuntimeTypeID returns the underlying type ID in current runtime from reflect.Type. NOTE:

*A and A returns the different runtime type ID;
It is 10 times performance of t.String().

func RuntimeTypeIDOf

func RuntimeTypeIDOf(i interface{}) uintptr

RuntimeTypeIDOf returns the underlying type ID in current runtime from interface object. NOTE:

*A and A returns the different runtime type ID;
It is 10 times performance of t.String().

func StringSetDifference

func StringSetDifference(set1, set2 []string, others ...[]string) []string

StringSetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func StringSetIntersect

func StringSetIntersect(set1, set2 []string, others ...[]string) []string

StringSetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func StringSetUnion

func StringSetUnion(set1, set2 []string, others ...[]string) []string

StringSetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func StringToBool

func StringToBool(v string, emptyAsFalse ...bool) (bool, error)

StringToBool converts string to bool.

func StringToBoolPtr

func StringToBoolPtr(v string, emptyAsFalse ...bool) (*bool, error)

StringToBoolPtr converts string to *bool.

func StringToFloat32

func StringToFloat32(v string, emptyAsZero ...bool) (float32, error)

StringToFloat32 converts string to float32.

func StringToFloat32Ptr

func StringToFloat32Ptr(v string, emptyAsZero ...bool) (*float32, error)

StringToFloat32Ptr converts string to *float32.

func StringToFloat64

func StringToFloat64(v string, emptyAsZero ...bool) (float64, error)

StringToFloat64 converts string to float64.

func StringToFloat64Ptr

func StringToFloat64Ptr(v string, emptyAsZero ...bool) (*float64, error)

StringToFloat64Ptr converts string to *float64.

func StringToInt

func StringToInt(v string, emptyAsZero ...bool) (int, error)

StringToInt converts string to int.

func StringToInt16

func StringToInt16(v string, emptyAsZero ...bool) (int16, error)

StringToInt16 converts string to int16.

func StringToInt16Ptr

func StringToInt16Ptr(v string, emptyAsZero ...bool) (*int16, error)

StringToInt16Ptr converts string to *int16.

func StringToInt32

func StringToInt32(v string, emptyAsZero ...bool) (int32, error)

StringToInt32 converts string to int32.

func StringToInt32Ptr

func StringToInt32Ptr(v string, emptyAsZero ...bool) (*int32, error)

StringToInt32Ptr converts string to *int32.

func StringToInt64

func StringToInt64(v string, emptyAsZero ...bool) (int64, error)

StringToInt64 converts string to int64.

func StringToInt64Ptr

func StringToInt64Ptr(v string, emptyAsZero ...bool) (*int64, error)

StringToInt64Ptr converts string to *int64.

func StringToInt8

func StringToInt8(v string, emptyAsZero ...bool) (int8, error)

StringToInt8 converts string to int8.

func StringToInt8Ptr

func StringToInt8Ptr(v string, emptyAsZero ...bool) (*int8, error)

StringToInt8Ptr converts string to *int8.

func StringToIntPtr

func StringToIntPtr(v string, emptyAsZero ...bool) (*int, error)

StringToIntPtr converts string to *int.

func StringToInterface

func StringToInterface(v string) interface{}

StringToInterface converts string to interface.

func StringToInterfacePtr

func StringToInterfacePtr(v string) *interface{}

StringToInterfacePtr converts string to *interface.

func StringToStringPtr

func StringToStringPtr(v string) *string

StringToStringPtr converts string to *string.

func StringToUint

func StringToUint(v string, emptyAsZero ...bool) (uint, error)

StringToUint converts string to uint.

func StringToUint16

func StringToUint16(v string, emptyAsZero ...bool) (uint16, error)

StringToUint16 converts string to uint16.

func StringToUint16Ptr

func StringToUint16Ptr(v string, emptyAsZero ...bool) (*uint16, error)

StringToUint16Ptr converts string to *uint16.

func StringToUint32

func StringToUint32(v string, emptyAsZero ...bool) (uint32, error)

StringToUint32 converts string to uint32.

func StringToUint32Ptr

func StringToUint32Ptr(v string, emptyAsZero ...bool) (*uint32, error)

StringToUint32Ptr converts string to *uint32.

func StringToUint64

func StringToUint64(v string, emptyAsZero ...bool) (uint64, error)

StringToUint64 converts string to uint64.

func StringToUint64Ptr

func StringToUint64Ptr(v string, emptyAsZero ...bool) (*uint64, error)

StringToUint64Ptr converts string to *uint64.

func StringToUint8

func StringToUint8(v string, emptyAsZero ...bool) (uint8, error)

StringToUint8 converts string to uint8.

func StringToUint8Ptr

func StringToUint8Ptr(v string, emptyAsZero ...bool) (*uint8, error)

StringToUint8Ptr converts string to *uint8.

func StringToUintPtr

func StringToUintPtr(v string, emptyAsZero ...bool) (*uint, error)

StringToUintPtr converts string to *uint.

func StringsConcat

func StringsConcat(s ...[]string) []string

StringsConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func StringsCopy

func StringsCopy(s []string) []string

StringsCopy creates a copy of the string slice.

func StringsCopyWithin

func StringsCopyWithin(s []string, target, start int, end ...int)

StringsCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func StringsDistinct

func StringsDistinct(s *[]string, changeSlice bool) (distinctCount map[string]int)

StringsDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func StringsEvery

func StringsEvery(s []string, fn func(s []string, k int, v string) bool) bool

StringsEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func StringsFill

func StringsFill(s []string, value string, start int, end ...int)

StringsFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func StringsFilter

func StringsFilter(s []string, fn func(s []string, k int, v string) bool) []string

StringsFilter creates a new slice with all elements that pass the test implemented by the provided function.

func StringsFind

func StringsFind(s []string, fn func(s []string, k int, v string) bool) (k int, v string)

StringsFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func StringsIncludes

func StringsIncludes(s []string, valueToFind string, fromIndex ...int) bool

StringsIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func StringsIndexOf

func StringsIndexOf(s []string, searchElement string, fromIndex ...int) int

StringsIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func StringsIntersect

func StringsIntersect(s ...[]string) (intersectCount map[string]int)

StringsIntersect calculates intersection of two or more slices, and returns the count of each element.

func StringsJoin

func StringsJoin(s []string, sep string) string

StringsJoin concatenates the elements of s to create a single string. The separator string sep is placed between elements in the resulting string.

func StringsLastIndexOf

func StringsLastIndexOf(s []string, searchElement string, fromIndex ...int) int

StringsLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func StringsMap

func StringsMap(s []string, fn func(s []string, k int, v string) string) []string

StringsMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func StringsPop

func StringsPop(s *[]string) (string, bool)

StringsPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func StringsPush

func StringsPush(s *[]string, element ...string) int

StringsPush adds one or more elements to the end of an slice and returns the new length of the slice.

func StringsPushDistinct

func StringsPushDistinct(s []string, element ...string) []string

StringsPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func StringsReduce

func StringsReduce(s []string, fn func(s []string, k int, v, accumulator string) string, initialValue ...string) string

StringsReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func StringsReduceRight

func StringsReduceRight(s []string, fn func(s []string, k int, v, accumulator string) string, initialValue ...string) string

StringsReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func StringsRemoveEvery

func StringsRemoveEvery(p *[]string, elements ...string) int

StringsRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func StringsRemoveFirst

func StringsRemoveFirst(p *[]string, elements ...string) int

StringsRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func StringsReverse

func StringsReverse(s []string)

StringsReverse reverses an slice in place.

func StringsShift

func StringsShift(s *[]string) (string, bool)

StringsShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func StringsSlice

func StringsSlice(s []string, begin int, end ...int) []string

StringsSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func StringsSome

func StringsSome(s []string, fn func(s []string, k int, v string) bool) bool

StringsSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func StringsSplice

func StringsSplice(s *[]string, start, deleteCount int, items ...string)

StringsSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func StringsToBools

func StringsToBools(s []string, emptyAsZero ...bool) ([]bool, error)

StringsToBools converts string slice to bool slice.

func StringsToFloat32s

func StringsToFloat32s(s []string, emptyAsZero ...bool) ([]float32, error)

StringsToFloat32s converts string slice to float32 slice.

func StringsToFloat64s

func StringsToFloat64s(s []string, emptyAsZero ...bool) ([]float64, error)

StringsToFloat64s converts string slice to float64 slice.

func StringsToInt16s

func StringsToInt16s(s []string, emptyAsZero ...bool) ([]int16, error)

StringsToInt16s converts string slice to int16 slice.

func StringsToInt32s

func StringsToInt32s(s []string, emptyAsZero ...bool) ([]int32, error)

StringsToInt32s converts string slice to int32 slice.

func StringsToInt64s

func StringsToInt64s(s []string, emptyAsZero ...bool) ([]int64, error)

StringsToInt64s converts string slice to int64 slice.

func StringsToInt8s

func StringsToInt8s(s []string, emptyAsZero ...bool) ([]int8, error)

StringsToInt8s converts string slice to int8 slice.

func StringsToInterfaces

func StringsToInterfaces(s []string) []interface{}

StringsToInterfaces converts string slice to interface slice.

func StringsToInts

func StringsToInts(s []string, emptyAsZero ...bool) ([]int, error)

StringsToInts converts string slice to int slice.

func StringsToUint16s

func StringsToUint16s(s []string, emptyAsZero ...bool) ([]uint16, error)

StringsToUint16s converts string slice to uint16 slice.

func StringsToUint32s

func StringsToUint32s(s []string, emptyAsZero ...bool) ([]uint32, error)

StringsToUint32s converts string slice to uint32 slice.

func StringsToUint64s

func StringsToUint64s(s []string, emptyAsZero ...bool) ([]uint64, error)

StringsToUint64s converts string slice to uint64 slice.

func StringsToUint8s

func StringsToUint8s(s []string, emptyAsZero ...bool) ([]uint8, error)

StringsToUint8s converts string slice to uint8 slice.

func StringsToUints

func StringsToUints(s []string, emptyAsZero ...bool) ([]uint, error)

StringsToUints converts string slice to uint slice.

func StringsUnshift

func StringsUnshift(s *[]string, element ...string) int

StringsUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func StringsUnshiftDistinct

func StringsUnshiftDistinct(s *[]string, element ...string) int

StringsUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Uint16SetDifference

func Uint16SetDifference(set1, set2 []uint16, others ...[]uint16) []uint16

Uint16SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Uint16SetIntersect

func Uint16SetIntersect(set1, set2 []uint16, others ...[]uint16) []uint16

Uint16SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Uint16SetUnion

func Uint16SetUnion(set1, set2 []uint16, others ...[]uint16) []uint16

Uint16SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Uint16ToBool

func Uint16ToBool(v uint16) bool

Uint16ToBool converts uint16 to bool.

func Uint16ToBoolPtr

func Uint16ToBoolPtr(v uint16) *bool

Uint16ToBoolPtr converts uint16 to *bool.

func Uint16ToFloat32

func Uint16ToFloat32(v uint16) float32

Uint16ToFloat32 converts uint16 to float32.

func Uint16ToFloat32Ptr

func Uint16ToFloat32Ptr(v uint16) *float32

Uint16ToFloat32Ptr converts uint16 to *float32.

func Uint16ToFloat64

func Uint16ToFloat64(v uint16) float64

Uint16ToFloat64 converts uint16 to float64.

func Uint16ToFloat64Ptr

func Uint16ToFloat64Ptr(v uint16) *float64

Uint16ToFloat64Ptr converts uint16 to *float64.

func Uint16ToInt

func Uint16ToInt(v uint16) int

Uint16ToInt converts uint16 to int.

func Uint16ToInt16

func Uint16ToInt16(v uint16) (int16, error)

Uint16ToInt16 converts uint16 to int16.

func Uint16ToInt16Ptr

func Uint16ToInt16Ptr(v uint16) (*int16, error)

Uint16ToInt16Ptr converts uint16 to *int16.

func Uint16ToInt32

func Uint16ToInt32(v uint16) int32

Uint16ToInt32 converts uint16 to int32.

func Uint16ToInt32Ptr

func Uint16ToInt32Ptr(v uint16) *int32

Uint16ToInt32Ptr converts uint16 to *int32.

func Uint16ToInt64

func Uint16ToInt64(v uint16) int64

Uint16ToInt64 converts uint16 to int64.

func Uint16ToInt64Ptr

func Uint16ToInt64Ptr(v uint16) *int64

Uint16ToInt64Ptr converts uint16 to *int64.

func Uint16ToInt8

func Uint16ToInt8(v uint16) (int8, error)

Uint16ToInt8 converts uint16 to int8.

func Uint16ToInt8Ptr

func Uint16ToInt8Ptr(v uint16) (*int8, error)

Uint16ToInt8Ptr converts uint16 to *int8.

func Uint16ToIntPtr

func Uint16ToIntPtr(v uint16) *int

Uint16ToIntPtr converts uint16 to *int.

func Uint16ToInterface

func Uint16ToInterface(v uint16) interface{}

Uint16ToInterface converts uint16 to interface.

func Uint16ToInterfacePtr

func Uint16ToInterfacePtr(v uint16) *interface{}

Uint16ToInterfacePtr converts uint16 to *interface.

func Uint16ToString

func Uint16ToString(v uint16) string

Uint16ToString converts uint16 to string.

func Uint16ToStringPtr

func Uint16ToStringPtr(v uint16) *string

Uint16ToStringPtr converts uint16 to *string.

func Uint16ToUint

func Uint16ToUint(v uint16) uint

Uint16ToUint converts uint16 to uint.

func Uint16ToUint16Ptr

func Uint16ToUint16Ptr(v uint16) *uint16

Uint16ToUint16Ptr converts uint16 to *uint16.

func Uint16ToUint32

func Uint16ToUint32(v uint16) uint32

Uint16ToUint32 converts uint16 to uint32.

func Uint16ToUint32Ptr

func Uint16ToUint32Ptr(v uint16) *uint32

Uint16ToUint32Ptr converts uint16 to *uint32.

func Uint16ToUint64

func Uint16ToUint64(v uint16) uint64

Uint16ToUint64 converts uint16 to uint64.

func Uint16ToUint64Ptr

func Uint16ToUint64Ptr(v uint16) *uint64

Uint16ToUint64Ptr converts uint16 to *uint64.

func Uint16ToUint8

func Uint16ToUint8(v uint16) (uint8, error)

Uint16ToUint8 converts uint16 to uint8.

func Uint16ToUint8Ptr

func Uint16ToUint8Ptr(v uint16) (*uint8, error)

Uint16ToUint8Ptr converts uint16 to *uint8.

func Uint16ToUintPtr

func Uint16ToUintPtr(v uint16) *uint

Uint16ToUintPtr converts uint16 to *uint.

func Uint16sConcat

func Uint16sConcat(u ...[]uint16) []uint16

Uint16sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Uint16sCopy

func Uint16sCopy(u []uint16) []uint16

Uint16sCopy creates a copy of the uint16 slice.

func Uint16sCopyWithin

func Uint16sCopyWithin(u []uint16, target, start int, end ...int)

Uint16sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint16sDistinct

func Uint16sDistinct(i *[]uint16, changeSlice bool) (distinctCount map[uint16]int)

Uint16sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Uint16sEvery

func Uint16sEvery(u []uint16, fn func(u []uint16, k int, v uint16) bool) bool

Uint16sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Uint16sFill

func Uint16sFill(u []uint16, value uint16, start int, end ...int)

Uint16sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint16sFilter

func Uint16sFilter(u []uint16, fn func(u []uint16, k int, v uint16) bool) []uint16

Uint16sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Uint16sFind

func Uint16sFind(u []uint16, fn func(u []uint16, k int, v uint16) bool) (k int, v uint16)

Uint16sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Uint16sIncludes

func Uint16sIncludes(u []uint16, valueToFind uint16, fromIndex ...int) bool

Uint16sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Uint16sIndexOf

func Uint16sIndexOf(u []uint16, searchElement uint16, fromIndex ...int) int

Uint16sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint16sIntersect

func Uint16sIntersect(u ...[]uint16) (intersectCount map[uint16]int)

Uint16sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Uint16sLastIndexOf

func Uint16sLastIndexOf(u []uint16, searchElement uint16, fromIndex ...int) int

Uint16sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint16sMap

func Uint16sMap(u []uint16, fn func(u []uint16, k int, v uint16) uint16) []uint16

Uint16sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Uint16sPop

func Uint16sPop(u *[]uint16) (uint16, bool)

Uint16sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Uint16sPush

func Uint16sPush(u *[]uint16, element ...uint16) int

Uint16sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Uint16sPushDistinct

func Uint16sPushDistinct(u []uint16, element ...uint16) []uint16

Uint16sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Uint16sReduce

func Uint16sReduce(
	u []uint16,
	fn func(u []uint16, k int, v, accumulator uint16) uint16, initialValue ...uint16,
) uint16

Uint16sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint16sReduceRight

func Uint16sReduceRight(
	u []uint16,
	fn func(u []uint16, k int, v, accumulator uint16) uint16, initialValue ...uint16,
) uint16

Uint16sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint16sRemoveEvery

func Uint16sRemoveEvery(p *[]uint16, elements ...uint16) int

Uint16sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Uint16sRemoveFirst

func Uint16sRemoveFirst(p *[]uint16, elements ...uint16) int

Uint16sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Uint16sReverse

func Uint16sReverse(u []uint16)

Uint16sReverse reverses an slice in place.

func Uint16sShift

func Uint16sShift(u *[]uint16) (uint16, bool)

Uint16sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Uint16sSlice

func Uint16sSlice(u []uint16, begin int, end ...int) []uint16

Uint16sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Uint16sSome

func Uint16sSome(u []uint16, fn func(u []uint16, k int, v uint16) bool) bool

Uint16sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Uint16sSplice

func Uint16sSplice(u *[]uint16, start, deleteCount int, items ...uint16)

Uint16sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Uint16sToBools

func Uint16sToBools(u []uint16) []bool

Uint16sToBools converts uint16 slice to bool slice. NOTE:

0 is false, everything else is true

func Uint16sToFloat32s

func Uint16sToFloat32s(u []uint16) []float32

Uint16sToFloat32s converts uint16 slice to float32 slice.

func Uint16sToFloat64s

func Uint16sToFloat64s(u []uint16) []float64

Uint16sToFloat64s converts uint16 slice to float64 slice.

func Uint16sToInt16s

func Uint16sToInt16s(u []uint16) ([]int16, error)

Uint16sToInt16s converts uint16 slice to int16 slice.

func Uint16sToInt32s

func Uint16sToInt32s(u []uint16) []int32

Uint16sToInt32s converts uint16 slice to int32 slice.

func Uint16sToInt64s

func Uint16sToInt64s(u []uint16) []int64

Uint16sToInt64s converts uint16 slice to int64 slice.

func Uint16sToInt8s

func Uint16sToInt8s(u []uint16) ([]int8, error)

Uint16sToInt8s converts uint16 slice to int8 slice.

func Uint16sToInterfaces

func Uint16sToInterfaces(u []uint16) []interface{}

Uint16sToInterfaces converts uint16 slice to interface slice.

func Uint16sToInts

func Uint16sToInts(u []uint16) []int

Uint16sToInts converts uint16 slice to int slice.

func Uint16sToStrings

func Uint16sToStrings(u []uint16) []string

Uint16sToStrings converts uint16 slice to string slice.

func Uint16sToUint32s

func Uint16sToUint32s(u []uint16) []uint32

Uint16sToUint32s converts uint16 slice to uint32 slice.

func Uint16sToUint64s

func Uint16sToUint64s(u []uint16) []uint64

Uint16sToUint64s converts uint16 slice to uint64 slice.

func Uint16sToUint8s

func Uint16sToUint8s(u []uint16) ([]uint8, error)

Uint16sToUint8s converts uint16 slice to uint8 slice.

func Uint16sToUints

func Uint16sToUints(u []uint16) []uint

Uint16sToUints converts uint16 slice to uint slice.

func Uint16sUnshift

func Uint16sUnshift(u *[]uint16, element ...uint16) int

Uint16sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Uint16sUnshiftDistinct

func Uint16sUnshiftDistinct(u *[]uint16, element ...uint16) int

Uint16sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Uint32SetDifference

func Uint32SetDifference(set1, set2 []uint32, others ...[]uint32) []uint32

Uint32SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Uint32SetIntersect

func Uint32SetIntersect(set1, set2 []uint32, others ...[]uint32) []uint32

Uint32SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Uint32SetUnion

func Uint32SetUnion(set1, set2 []uint32, others ...[]uint32) []uint32

Uint32SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Uint32ToBool

func Uint32ToBool(v uint32) bool

Uint32ToBool converts uint32 to bool.

func Uint32ToBoolPtr

func Uint32ToBoolPtr(v uint32) *bool

Uint32ToBoolPtr converts uint32 to *bool.

func Uint32ToFloat32

func Uint32ToFloat32(v uint32) float32

Uint32ToFloat32 converts uint32 to float32.

func Uint32ToFloat32Ptr

func Uint32ToFloat32Ptr(v uint32) *float32

Uint32ToFloat32Ptr converts uint32 to *float32.

func Uint32ToFloat64

func Uint32ToFloat64(v uint32) float64

Uint32ToFloat64 converts uint32 to float64.

func Uint32ToFloat64Ptr

func Uint32ToFloat64Ptr(v uint32) *float64

Uint32ToFloat64Ptr converts uint32 to *float64.

func Uint32ToInt

func Uint32ToInt(v uint32) int

Uint32ToInt converts uint32 to int.

func Uint32ToInt16

func Uint32ToInt16(v uint32) (int16, error)

Uint32ToInt16 converts uint32 to int16.

func Uint32ToInt16Ptr

func Uint32ToInt16Ptr(v uint32) (*int16, error)

Uint32ToInt16Ptr converts uint32 to *int16.

func Uint32ToInt32

func Uint32ToInt32(v uint32) (int32, error)

Uint32ToInt32 converts uint32 to int32.

func Uint32ToInt32Ptr

func Uint32ToInt32Ptr(v uint32) (*int32, error)

Uint32ToInt32Ptr converts uint32 to *int32.

func Uint32ToInt64

func Uint32ToInt64(v uint32) int64

Uint32ToInt64 converts uint32 to int64.

func Uint32ToInt64Ptr

func Uint32ToInt64Ptr(v uint32) *int64

Uint32ToInt64Ptr converts uint32 to *int64.

func Uint32ToInt8

func Uint32ToInt8(v uint32) (int8, error)

Uint32ToInt8 converts uint32 to int8.

func Uint32ToInt8Ptr

func Uint32ToInt8Ptr(v uint32) (*int8, error)

Uint32ToInt8Ptr converts uint32 to *int8.

func Uint32ToIntPtr

func Uint32ToIntPtr(v uint32) *int

Uint32ToIntPtr converts uint32 to *int.

func Uint32ToInterface

func Uint32ToInterface(v uint32) interface{}

Uint32ToInterface converts uint32 to interface.

func Uint32ToInterfacePtr

func Uint32ToInterfacePtr(v uint32) *interface{}

Uint32ToInterfacePtr converts uint32 to *interface.

func Uint32ToString

func Uint32ToString(v uint32) string

Uint32ToString converts uint32 to string.

func Uint32ToStringPtr

func Uint32ToStringPtr(v uint32) *string

Uint32ToStringPtr converts uint32 to *string.

func Uint32ToUint

func Uint32ToUint(v uint32) uint

Uint32ToUint converts uint32 to uint.

func Uint32ToUint16

func Uint32ToUint16(v uint32) (uint16, error)

Uint32ToUint16 converts uint32 to uint16.

func Uint32ToUint16Ptr

func Uint32ToUint16Ptr(v uint32) (*uint16, error)

Uint32ToUint16Ptr converts uint32 to *uint16.

func Uint32ToUint32Ptr

func Uint32ToUint32Ptr(v uint32) *uint32

Uint32ToUint32Ptr converts uint32 to *uint32.

func Uint32ToUint64

func Uint32ToUint64(v uint32) uint64

Uint32ToUint64 converts uint32 to uint64.

func Uint32ToUint64Ptr

func Uint32ToUint64Ptr(v uint32) *uint64

Uint32ToUint64Ptr converts uint32 to *uint64.

func Uint32ToUint8

func Uint32ToUint8(v uint32) (uint8, error)

Uint32ToUint8 converts uint32 to uint8.

func Uint32ToUint8Ptr

func Uint32ToUint8Ptr(v uint32) (*uint8, error)

Uint32ToUint8Ptr converts uint32 to *uint8.

func Uint32ToUintPtr

func Uint32ToUintPtr(v uint32) *uint

Uint32ToUintPtr converts uint32 to *uint.

func Uint32sConcat

func Uint32sConcat(u ...[]uint32) []uint32

Uint32sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Uint32sCopy

func Uint32sCopy(u []uint32) []uint32

Uint32sCopy creates a copy of the uint32 slice.

func Uint32sCopyWithin

func Uint32sCopyWithin(u []uint32, target, start int, end ...int)

Uint32sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint32sDistinct

func Uint32sDistinct(i *[]uint32, changeSlice bool) (distinctCount map[uint32]int)

Uint32sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Uint32sEvery

func Uint32sEvery(u []uint32, fn func(u []uint32, k int, v uint32) bool) bool

Uint32sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Uint32sFill

func Uint32sFill(u []uint32, value uint32, start int, end ...int)

Uint32sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint32sFilter

func Uint32sFilter(u []uint32, fn func(u []uint32, k int, v uint32) bool) []uint32

Uint32sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Uint32sFind

func Uint32sFind(u []uint32, fn func(u []uint32, k int, v uint32) bool) (k int, v uint32)

Uint32sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Uint32sIncludes

func Uint32sIncludes(u []uint32, valueToFind uint32, fromIndex ...int) bool

Uint32sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Uint32sIndexOf

func Uint32sIndexOf(u []uint32, searchElement uint32, fromIndex ...int) int

Uint32sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint32sIntersect

func Uint32sIntersect(u ...[]uint32) (intersectCount map[uint32]int)

Uint32sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Uint32sLastIndexOf

func Uint32sLastIndexOf(u []uint32, searchElement uint32, fromIndex ...int) int

Uint32sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint32sMap

func Uint32sMap(u []uint32, fn func(u []uint32, k int, v uint32) uint32) []uint32

Uint32sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Uint32sPop

func Uint32sPop(u *[]uint32) (uint32, bool)

Uint32sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Uint32sPush

func Uint32sPush(u *[]uint32, element ...uint32) int

Uint32sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Uint32sPushDistinct

func Uint32sPushDistinct(u []uint32, element ...uint32) []uint32

Uint32sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Uint32sReduce

func Uint32sReduce(
	u []uint32,
	fn func(u []uint32, k int, v, accumulator uint32) uint32, initialValue ...uint32,
) uint32

Uint32sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint32sReduceRight

func Uint32sReduceRight(
	u []uint32,
	fn func(u []uint32, k int, v, accumulator uint32) uint32, initialValue ...uint32,
) uint32

Uint32sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint32sRemoveEvery

func Uint32sRemoveEvery(p *[]uint32, elements ...uint32) int

Uint32sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Uint32sRemoveFirst

func Uint32sRemoveFirst(p *[]uint32, elements ...uint32) int

Uint32sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Uint32sReverse

func Uint32sReverse(u []uint32)

Uint32sReverse reverses an slice in place.

func Uint32sShift

func Uint32sShift(u *[]uint32) (uint32, bool)

Uint32sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Uint32sSlice

func Uint32sSlice(u []uint32, begin int, end ...int) []uint32

Uint32sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Uint32sSome

func Uint32sSome(u []uint32, fn func(u []uint32, k int, v uint32) bool) bool

Uint32sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Uint32sSplice

func Uint32sSplice(u *[]uint32, start, deleteCount int, items ...uint32)

Uint32sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Uint32sToBools

func Uint32sToBools(u []uint32) []bool

Uint32sToBools converts uint32 slice to bool slice. NOTE:

0 is false, everything else is true

func Uint32sToFloat32s

func Uint32sToFloat32s(u []uint32) []float32

Uint32sToFloat32s converts uint32 slice to float32 slice.

func Uint32sToFloat64s

func Uint32sToFloat64s(u []uint32) []float64

Uint32sToFloat64s converts uint32 slice to float64 slice.

func Uint32sToInt16s

func Uint32sToInt16s(u []uint32) ([]int16, error)

Uint32sToInt16s converts uint32 slice to int16 slice.

func Uint32sToInt32s

func Uint32sToInt32s(u []uint32) ([]int32, error)

Uint32sToInt32s converts uint32 slice to int32 slice.

func Uint32sToInt64s

func Uint32sToInt64s(u []uint32) []int64

Uint32sToInt64s converts uint32 slice to int64 slice.

func Uint32sToInt8s

func Uint32sToInt8s(u []uint32) ([]int8, error)

Uint32sToInt8s converts uint32 slice to int8 slice.

func Uint32sToInterfaces

func Uint32sToInterfaces(u []uint32) []interface{}

Uint32sToInterfaces converts uint32 slice to interface slice.

func Uint32sToInts

func Uint32sToInts(u []uint32) []int

Uint32sToInts converts uint32 slice to int slice.

func Uint32sToStrings

func Uint32sToStrings(u []uint32) []string

Uint32sToStrings converts uint32 slice to string slice.

func Uint32sToUint16s

func Uint32sToUint16s(u []uint32) ([]uint16, error)

Uint32sToUint16s converts uint32 slice to uint16 slice.

func Uint32sToUint64s

func Uint32sToUint64s(u []uint32) []uint64

Uint32sToUint64s converts uint32 slice to uint64 slice.

func Uint32sToUint8s

func Uint32sToUint8s(u []uint32) ([]uint8, error)

Uint32sToUint8s converts uint32 slice to uint8 slice.

func Uint32sToUints

func Uint32sToUints(u []uint32) []uint

Uint32sToUints converts uint32 slice to uint slice.

func Uint32sUnshift

func Uint32sUnshift(u *[]uint32, element ...uint32) int

Uint32sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Uint32sUnshiftDistinct

func Uint32sUnshiftDistinct(u *[]uint32, element ...uint32) int

Uint32sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Uint64SetDifference

func Uint64SetDifference(set1, set2 []uint64, others ...[]uint64) []uint64

Uint64SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Uint64SetIntersect

func Uint64SetIntersect(set1, set2 []uint64, others ...[]uint64) []uint64

Uint64SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Uint64SetUnion

func Uint64SetUnion(set1, set2 []uint64, others ...[]uint64) []uint64

Uint64SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Uint64ToBool

func Uint64ToBool(v uint64) bool

Uint64ToBool converts uint64 to bool.

func Uint64ToBoolPtr

func Uint64ToBoolPtr(v uint64) *bool

Uint64ToBoolPtr converts uint64 to *bool.

func Uint64ToFloat32

func Uint64ToFloat32(v uint64) float32

Uint64ToFloat32 converts uint64 to float32.

func Uint64ToFloat32Ptr

func Uint64ToFloat32Ptr(v uint64) *float32

Uint64ToFloat32Ptr converts uint64 to *float32.

func Uint64ToFloat64

func Uint64ToFloat64(v uint64) float64

Uint64ToFloat64 converts uint64 to float64.

func Uint64ToFloat64Ptr

func Uint64ToFloat64Ptr(v uint64) *float64

Uint64ToFloat64Ptr converts uint64 to *float64.

func Uint64ToInt

func Uint64ToInt(v uint64) int

Uint64ToInt converts uint64 to int.

func Uint64ToInt16

func Uint64ToInt16(v uint64) (int16, error)

Uint64ToInt16 converts uint64 to int16.

func Uint64ToInt16Ptr

func Uint64ToInt16Ptr(v uint64) (*int16, error)

Uint64ToInt16Ptr converts uint64 to *int16.

func Uint64ToInt32

func Uint64ToInt32(v uint64) (int32, error)

Uint64ToInt32 converts uint64 to int32.

func Uint64ToInt32Ptr

func Uint64ToInt32Ptr(v uint64) (*int32, error)

Uint64ToInt32Ptr converts uint64 to *int32.

func Uint64ToInt64

func Uint64ToInt64(v uint64) (int64, error)

Uint64ToInt64 converts uint64 to int64.

func Uint64ToInt64Ptr

func Uint64ToInt64Ptr(v uint64) (*int64, error)

Uint64ToInt64Ptr converts uint64 to *int64.

func Uint64ToInt8

func Uint64ToInt8(v uint64) (int8, error)

Uint64ToInt8 converts uint64 to int8.

func Uint64ToInt8Ptr

func Uint64ToInt8Ptr(v uint64) (*int8, error)

Uint64ToInt8Ptr converts uint64 to *int8.

func Uint64ToIntPtr

func Uint64ToIntPtr(v uint64) *int

Uint64ToIntPtr converts uint64 to *int.

func Uint64ToInterface

func Uint64ToInterface(v uint64) interface{}

Uint64ToInterface converts uint64 to interface.

func Uint64ToInterfacePtr

func Uint64ToInterfacePtr(v uint64) *interface{}

Uint64ToInterfacePtr converts uint64 to *interface.

func Uint64ToString

func Uint64ToString(v uint64) string

Uint64ToString converts uint64 to string.

func Uint64ToStringPtr

func Uint64ToStringPtr(v uint64) *string

Uint64ToStringPtr converts uint64 to *string.

func Uint64ToUint

func Uint64ToUint(v uint64) (uint, error)

Uint64ToUint converts uint64 to uint.

func Uint64ToUint16

func Uint64ToUint16(v uint64) (uint16, error)

Uint64ToUint16 converts uint64 to uint16.

func Uint64ToUint16Ptr

func Uint64ToUint16Ptr(v uint64) (*uint16, error)

Uint64ToUint16Ptr converts uint64 to *uint16.

func Uint64ToUint32

func Uint64ToUint32(v uint64) (uint32, error)

Uint64ToUint32 converts uint64 to uint32.

func Uint64ToUint32Ptr

func Uint64ToUint32Ptr(v uint64) (*uint32, error)

Uint64ToUint32Ptr converts uint64 to *uint32.

func Uint64ToUint64Ptr

func Uint64ToUint64Ptr(v uint64) *uint64

Uint64ToUint64Ptr converts uint64 to *uint64.

func Uint64ToUint8

func Uint64ToUint8(v uint64) (uint8, error)

Uint64ToUint8 converts uint64 to uint8.

func Uint64ToUint8Ptr

func Uint64ToUint8Ptr(v uint64) (*uint8, error)

Uint64ToUint8Ptr converts uint64 to *uint8.

func Uint64ToUintPtr

func Uint64ToUintPtr(v uint64) (*uint, error)

Uint64ToUintPtr converts uint64 to *uint.

func Uint64sConcat

func Uint64sConcat(u ...[]uint64) []uint64

Uint64sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Uint64sCopy

func Uint64sCopy(u []uint64) []uint64

Uint64sCopy creates a copy of the uint64 slice.

func Uint64sCopyWithin

func Uint64sCopyWithin(u []uint64, target, start int, end ...int)

Uint64sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint64sDistinct

func Uint64sDistinct(i *[]uint64, changeSlice bool) (distinctCount map[uint64]int)

Uint64sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Uint64sEvery

func Uint64sEvery(u []uint64, fn func(u []uint64, k int, v uint64) bool) bool

Uint64sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Uint64sFill

func Uint64sFill(u []uint64, value uint64, start int, end ...int)

Uint64sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint64sFilter

func Uint64sFilter(u []uint64, fn func(u []uint64, k int, v uint64) bool) []uint64

Uint64sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Uint64sFind

func Uint64sFind(u []uint64, fn func(u []uint64, k int, v uint64) bool) (k int, v uint64)

Uint64sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Uint64sIncludes

func Uint64sIncludes(u []uint64, valueToFind uint64, fromIndex ...int) bool

Uint64sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Uint64sIndexOf

func Uint64sIndexOf(u []uint64, searchElement uint64, fromIndex ...int) int

Uint64sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint64sIntersect

func Uint64sIntersect(u ...[]uint64) (intersectCount map[uint64]int)

Uint64sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Uint64sLastIndexOf

func Uint64sLastIndexOf(u []uint64, searchElement uint64, fromIndex ...int) int

Uint64sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint64sMap

func Uint64sMap(u []uint64, fn func(u []uint64, k int, v uint64) uint64) []uint64

Uint64sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Uint64sPop

func Uint64sPop(u *[]uint64) (uint64, bool)

Uint64sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Uint64sPush

func Uint64sPush(u *[]uint64, element ...uint64) int

Uint64sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Uint64sPushDistinct

func Uint64sPushDistinct(u []uint64, element ...uint64) []uint64

Uint64sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Uint64sReduce

func Uint64sReduce(
	u []uint64,
	fn func(u []uint64, k int, v, accumulator uint64) uint64, initialValue ...uint64,
) uint64

Uint64sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint64sReduceRight

func Uint64sReduceRight(
	u []uint64,
	fn func(u []uint64, k int, v, accumulator uint64) uint64, initialValue ...uint64,
) uint64

Uint64sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint64sRemoveEvery

func Uint64sRemoveEvery(p *[]uint64, elements ...uint64) int

Uint64sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Uint64sRemoveFirst

func Uint64sRemoveFirst(p *[]uint64, elements ...uint64) int

Uint64sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Uint64sReverse

func Uint64sReverse(u []uint64)

Uint64sReverse reverses an slice in place.

func Uint64sShift

func Uint64sShift(u *[]uint64) (uint64, bool)

Uint64sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Uint64sSlice

func Uint64sSlice(u []uint64, begin int, end ...int) []uint64

Uint64sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Uint64sSome

func Uint64sSome(u []uint64, fn func(u []uint64, k int, v uint64) bool) bool

Uint64sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Uint64sSplice

func Uint64sSplice(u *[]uint64, start, deleteCount int, items ...uint64)

Uint64sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Uint64sToBools

func Uint64sToBools(u []uint64) []bool

Uint64sToBools converts uint64 slice to bool slice. NOTE:

0 is false, everything else is true

func Uint64sToFloat32s

func Uint64sToFloat32s(u []uint64) []float32

Uint64sToFloat32s converts uint64 slice to float32 slice.

func Uint64sToFloat64s

func Uint64sToFloat64s(u []uint64) []float64

Uint64sToFloat64s converts uint64 slice to float64 slice.

func Uint64sToInt16s

func Uint64sToInt16s(u []uint64) ([]int16, error)

Uint64sToInt16s converts uint64 slice to int16 slice.

func Uint64sToInt32s

func Uint64sToInt32s(u []uint64) ([]int32, error)

Uint64sToInt32s converts uint64 slice to int32 slice.

func Uint64sToInt64s

func Uint64sToInt64s(u []uint64) ([]int64, error)

Uint64sToInt64s converts uint64 slice to int64 slice.

func Uint64sToInt8s

func Uint64sToInt8s(u []uint64) ([]int8, error)

Uint64sToInt8s converts uint64 slice to int8 slice.

func Uint64sToInterfaces

func Uint64sToInterfaces(u []uint64) []interface{}

Uint64sToInterfaces converts uint64 slice to interface slice.

func Uint64sToInts

func Uint64sToInts(u []uint64) []int

Uint64sToInts converts uint64 slice to int slice.

func Uint64sToStrings

func Uint64sToStrings(u []uint64) []string

Uint64sToStrings converts uint64 slice to string slice.

func Uint64sToUint16s

func Uint64sToUint16s(u []uint64) ([]uint16, error)

Uint64sToUint16s converts uint64 slice to uint16 slice.

func Uint64sToUint32s

func Uint64sToUint32s(u []uint64) ([]uint32, error)

Uint64sToUint32s converts uint64 slice to uint32 slice.

func Uint64sToUint8s

func Uint64sToUint8s(u []uint64) ([]uint8, error)

Uint64sToUint8s converts uint64 slice to uint8 slice.

func Uint64sToUints

func Uint64sToUints(u []uint64) ([]uint, error)

Uint64sToUints converts uint64 slice to uint slice.

func Uint64sUnshift

func Uint64sUnshift(u *[]uint64, element ...uint64) int

Uint64sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Uint64sUnshiftDistinct

func Uint64sUnshiftDistinct(u *[]uint64, element ...uint64) int

Uint64sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func Uint8SetDifference

func Uint8SetDifference(set1, set2 []uint8, others ...[]uint8) []uint8

Uint8SetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func Uint8SetIntersect

func Uint8SetIntersect(set1, set2 []uint8, others ...[]uint8) []uint8

Uint8SetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func Uint8SetUnion

func Uint8SetUnion(set1, set2 []uint8, others ...[]uint8) []uint8

Uint8SetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func Uint8ToBool

func Uint8ToBool(v uint8) bool

Uint8ToBool converts uint8 to bool.

func Uint8ToBoolPtr

func Uint8ToBoolPtr(v uint8) *bool

Uint8ToBoolPtr converts uint8 to *bool.

func Uint8ToFloat32

func Uint8ToFloat32(v uint8) float32

Uint8ToFloat32 converts uint8 to float32.

func Uint8ToFloat32Ptr

func Uint8ToFloat32Ptr(v uint8) *float32

Uint8ToFloat32Ptr converts uint8 to *float32.

func Uint8ToFloat64

func Uint8ToFloat64(v uint8) float64

Uint8ToFloat64 converts uint8 to float64.

func Uint8ToFloat64Ptr

func Uint8ToFloat64Ptr(v uint8) *float64

Uint8ToFloat64Ptr converts uint8 to *float64.

func Uint8ToInt

func Uint8ToInt(v uint8) int

Uint8ToInt converts uint8 to int.

func Uint8ToInt16

func Uint8ToInt16(v uint8) int16

Uint8ToInt16 converts uint8 to int16.

func Uint8ToInt16Ptr

func Uint8ToInt16Ptr(v uint8) *int16

Uint8ToInt16Ptr converts uint8 to *int16.

func Uint8ToInt32

func Uint8ToInt32(v uint8) int32

Uint8ToInt32 converts uint8 to int32.

func Uint8ToInt32Ptr

func Uint8ToInt32Ptr(v uint8) *int32

Uint8ToInt32Ptr converts uint8 to *int32.

func Uint8ToInt64

func Uint8ToInt64(v uint8) int64

Uint8ToInt64 converts uint8 to int64.

func Uint8ToInt64Ptr

func Uint8ToInt64Ptr(v uint8) *int64

Uint8ToInt64Ptr converts uint8 to *int64.

func Uint8ToInt8

func Uint8ToInt8(v uint8) (int8, error)

Uint8ToInt8 converts uint8 to int8.

func Uint8ToInt8Ptr

func Uint8ToInt8Ptr(v uint8) (*int8, error)

Uint8ToInt8Ptr converts uint8 to *int8.

func Uint8ToIntPtr

func Uint8ToIntPtr(v uint8) *int

Uint8ToIntPtr converts uint8 to *int.

func Uint8ToInterface

func Uint8ToInterface(v uint8) interface{}

Uint8ToInterface converts uint8 to interface.

func Uint8ToInterfacePtr

func Uint8ToInterfacePtr(v uint8) *interface{}

Uint8ToInterfacePtr converts uint8 to *interface.

func Uint8ToString

func Uint8ToString(v uint8) string

Uint8ToString converts uint8 to string.

func Uint8ToStringPtr

func Uint8ToStringPtr(v uint8) *string

Uint8ToStringPtr converts uint8 to *string.

func Uint8ToUint

func Uint8ToUint(v uint8) uint

Uint8ToUint converts uint8 to uint.

func Uint8ToUint16

func Uint8ToUint16(v uint8) uint16

Uint8ToUint16 converts uint8 to uint16.

func Uint8ToUint16Ptr

func Uint8ToUint16Ptr(v uint8) *uint16

Uint8ToUint16Ptr converts uint8 to *uint16.

func Uint8ToUint32

func Uint8ToUint32(v uint8) uint32

Uint8ToUint32 converts uint8 to uint32.

func Uint8ToUint32Ptr

func Uint8ToUint32Ptr(v uint8) *uint32

Uint8ToUint32Ptr converts uint8 to *uint32.

func Uint8ToUint64

func Uint8ToUint64(v uint8) uint64

Uint8ToUint64 converts uint8 to uint64.

func Uint8ToUint64Ptr

func Uint8ToUint64Ptr(v uint8) *uint64

Uint8ToUint64Ptr converts uint8 to *uint64.

func Uint8ToUint8Ptr

func Uint8ToUint8Ptr(v uint8) *uint8

Uint8ToUint8Ptr converts uint8 to *uint8.

func Uint8ToUintPtr

func Uint8ToUintPtr(v uint8) *uint

Uint8ToUintPtr converts uint8 to *uint.

func Uint8sConcat

func Uint8sConcat(u ...[]uint8) []uint8

Uint8sConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func Uint8sCopy

func Uint8sCopy(u []uint8) []uint8

Uint8sCopy creates a copy of the uint8 slice.

func Uint8sCopyWithin

func Uint8sCopyWithin(u []uint8, target, start int, end ...int)

Uint8sCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint8sDistinct

func Uint8sDistinct(i *[]uint8, changeSlice bool) (distinctCount map[uint8]int)

Uint8sDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func Uint8sEvery

func Uint8sEvery(u []uint8, fn func(u []uint8, k int, v uint8) bool) bool

Uint8sEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func Uint8sFill

func Uint8sFill(u []uint8, value uint8, start int, end ...int)

Uint8sFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func Uint8sFilter

func Uint8sFilter(u []uint8, fn func(u []uint8, k int, v uint8) bool) []uint8

Uint8sFilter creates a new slice with all elements that pass the test implemented by the provided function.

func Uint8sFind

func Uint8sFind(u []uint8, fn func(u []uint8, k int, v uint8) bool) (k int, v uint8)

Uint8sFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func Uint8sIncludes

func Uint8sIncludes(u []uint8, valueToFind uint8, fromIndex ...int) bool

Uint8sIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func Uint8sIndexOf

func Uint8sIndexOf(u []uint8, searchElement uint8, fromIndex ...int) int

Uint8sIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint8sIntersect

func Uint8sIntersect(u ...[]uint8) (intersectCount map[uint8]int)

Uint8sIntersect calculates intersection of two or more slices, and returns the count of each element.

func Uint8sLastIndexOf

func Uint8sLastIndexOf(u []uint8, searchElement uint8, fromIndex ...int) int

Uint8sLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func Uint8sMap

func Uint8sMap(u []uint8, fn func(u []uint8, k int, v uint8) uint8) []uint8

Uint8sMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func Uint8sPop

func Uint8sPop(u *[]uint8) (uint8, bool)

Uint8sPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func Uint8sPush

func Uint8sPush(u *[]uint8, element ...uint8) int

Uint8sPush adds one or more elements to the end of an slice and returns the new length of the slice.

func Uint8sPushDistinct

func Uint8sPushDistinct(u []uint8, element ...uint8) []uint8

Uint8sPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func Uint8sReduce

func Uint8sReduce(u []uint8,
	fn func(u []uint8, k int, v, accumulator uint8) uint8, initialValue ...uint8,
) uint8

Uint8sReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint8sReduceRight

func Uint8sReduceRight(u []uint8,
	fn func(u []uint8, k int, v, accumulator uint8) uint8, initialValue ...uint8,
) uint8

Uint8sReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func Uint8sRemoveEvery

func Uint8sRemoveEvery(p *[]uint8, elements ...uint8) int

Uint8sRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func Uint8sRemoveFirst

func Uint8sRemoveFirst(p *[]uint8, elements ...uint8) int

Uint8sRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func Uint8sReverse

func Uint8sReverse(u []uint8)

Uint8sReverse reverses an slice in place.

func Uint8sShift

func Uint8sShift(u *[]uint8) (uint8, bool)

Uint8sShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func Uint8sSlice

func Uint8sSlice(u []uint8, begin int, end ...int) []uint8

Uint8sSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func Uint8sSome

func Uint8sSome(u []uint8, fn func(u []uint8, k int, v uint8) bool) bool

Uint8sSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func Uint8sSplice

func Uint8sSplice(u *[]uint8, start, deleteCount int, items ...uint8)

Uint8sSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func Uint8sToBools

func Uint8sToBools(u []uint8) []bool

Uint8sToBools converts uint8 slice to bool slice. NOTE:

0 is false, everything else is true

func Uint8sToFloat32s

func Uint8sToFloat32s(u []uint8) []float32

Uint8sToFloat32s converts uint8 slice to float32 slice.

func Uint8sToFloat64s

func Uint8sToFloat64s(u []uint8) []float64

Uint8sToFloat64s converts uint8 slice to float64 slice.

func Uint8sToInt16s

func Uint8sToInt16s(u []uint8) []int16

Uint8sToInt16s converts uint8 slice to int16 slice.

func Uint8sToInt32s

func Uint8sToInt32s(u []uint8) []int32

Uint8sToInt32s converts uint8 slice to int32 slice.

func Uint8sToInt64s

func Uint8sToInt64s(u []uint8) []int64

Uint8sToInt64s converts uint8 slice to int64 slice.

func Uint8sToInt8s

func Uint8sToInt8s(u []uint8) ([]int8, error)

Uint8sToInt8s converts uint8 slice to int8 slice.

func Uint8sToInterfaces

func Uint8sToInterfaces(u []uint8) []interface{}

Uint8sToInterfaces converts uint8 slice to interface slice.

func Uint8sToInts

func Uint8sToInts(u []uint8) []int

Uint8sToInts converts uint8 slice to int slice.

func Uint8sToStrings

func Uint8sToStrings(u []uint8) []string

Uint8sToStrings converts uint8 slice to string slice.

func Uint8sToUint16s

func Uint8sToUint16s(u []uint8) []uint16

Uint8sToUint16s converts uint8 slice to uint16 slice.

func Uint8sToUint32s

func Uint8sToUint32s(u []uint8) []uint32

Uint8sToUint32s converts uint8 slice to uint32 slice.

func Uint8sToUint64s

func Uint8sToUint64s(u []uint8) []uint64

Uint8sToUint64s converts uint8 slice to uint64 slice.

func Uint8sToUints

func Uint8sToUints(u []uint8) []uint

Uint8sToUints converts uint8 slice to uint slice.

func Uint8sUnshift

func Uint8sUnshift(u *[]uint8, element ...uint8) int

Uint8sUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func Uint8sUnshiftDistinct

func Uint8sUnshiftDistinct(u *[]uint8, element ...uint8) int

Uint8sUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func UintSetDifference

func UintSetDifference(set1, set2 []uint, others ...[]uint) []uint

UintSetDifference calculates between multiple collections: set1 - set2 - others... This method does not change the existing slices, but instead returns a new slice.

func UintSetIntersect

func UintSetIntersect(set1, set2 []uint, others ...[]uint) []uint

UintSetIntersect calculates between multiple collections: set1 ∩ set2 ∩ others... This method does not change the existing slices, but instead returns a new slice.

func UintSetUnion

func UintSetUnion(set1, set2 []uint, others ...[]uint) []uint

UintSetUnion calculates between multiple collections: set1 ∪ set2 ∪ others... This method does not change the existing slices, but instead returns a new slice.

func UintToBool

func UintToBool(v uint) bool

UintToBool converts uint to bool.

func UintToBoolPtr

func UintToBoolPtr(v uint) *bool

UintToBoolPtr converts uint to *bool.

func UintToFloat32

func UintToFloat32(v uint) float32

UintToFloat32 converts uint to float32.

func UintToFloat32Ptr

func UintToFloat32Ptr(v uint) *float32

UintToFloat32Ptr converts uint to *float32.

func UintToFloat64

func UintToFloat64(v uint) float64

UintToFloat64 converts uint to float64.

func UintToFloat64Ptr

func UintToFloat64Ptr(v uint) *float64

UintToFloat64Ptr converts uint to *float64.

func UintToInt

func UintToInt(v uint) (int, error)

UintToInt converts uint to int.

func UintToInt16

func UintToInt16(v uint) (int16, error)

UintToInt16 converts uint to int16.

func UintToInt16Ptr

func UintToInt16Ptr(v uint) (*int16, error)

UintToInt16Ptr converts uint to *int16.

func UintToInt32

func UintToInt32(v uint) (int32, error)

UintToInt32 converts uint to int32.

func UintToInt32Ptr

func UintToInt32Ptr(v uint) (*int32, error)

UintToInt32Ptr converts uint to *int32.

func UintToInt64

func UintToInt64(v uint) (int64, error)

UintToInt64 converts uint to int64.

func UintToInt64Ptr

func UintToInt64Ptr(v uint) (*int64, error)

UintToInt64Ptr converts uint to *int64.

func UintToInt8

func UintToInt8(v uint) (int8, error)

UintToInt8 converts uint to int8.

func UintToInt8Ptr

func UintToInt8Ptr(v uint) (*int8, error)

UintToInt8Ptr converts uint to *int8.

func UintToIntPtr

func UintToIntPtr(v uint) (*int, error)

UintToIntPtr converts uint to *int.

func UintToInterface

func UintToInterface(v uint) interface{}

UintToInterface converts uint to interface.

func UintToInterfacePtr

func UintToInterfacePtr(v uint) *interface{}

UintToInterfacePtr converts uint to *interface.

func UintToString

func UintToString(v uint) string

UintToString converts uint to string.

func UintToStringPtr

func UintToStringPtr(v uint) *string

UintToStringPtr converts uint to *string.

func UintToUint16

func UintToUint16(v uint) (uint16, error)

UintToUint16 converts uint to uint16.

func UintToUint16Ptr

func UintToUint16Ptr(v uint) (*uint16, error)

UintToUint16Ptr converts uint to *uint16.

func UintToUint32

func UintToUint32(v uint) (uint32, error)

UintToUint32 converts uint to uint32.

func UintToUint32Ptr

func UintToUint32Ptr(v uint) (*uint32, error)

UintToUint32Ptr converts uint to *uint32.

func UintToUint64

func UintToUint64(v uint) uint64

UintToUint64 converts uint to uint64.

func UintToUint64Ptr

func UintToUint64Ptr(v uint) *uint64

UintToUint64Ptr converts uint to *uint64.

func UintToUint8

func UintToUint8(v uint) (uint8, error)

UintToUint8 converts uint to uint8.

func UintToUint8Ptr

func UintToUint8Ptr(v uint) (*uint8, error)

UintToUint8Ptr converts uint to *uint8.

func UintToUintPtr

func UintToUintPtr(v uint) *uint

UintToUintPtr converts uint to *uint.

func UintsConcat

func UintsConcat(u ...[]uint) []uint

UintsConcat is used to merge two or more slices. This method does not change the existing slices, but instead returns a new slice.

func UintsCopy

func UintsCopy(u []uint) []uint

UintsCopy creates a copy of the uint slice.

func UintsCopyWithin

func UintsCopyWithin(u []uint, target, start int, end ...int)

UintsCopyWithin copies part of an slice to another location in the current slice. @target

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func UintsDistinct

func UintsDistinct(i *[]uint, changeSlice bool) (distinctCount map[uint]int)

UintsDistinct calculates the count of each different element, and only saves these different elements in place if changeSlice is true.

func UintsEvery

func UintsEvery(u []uint, fn func(u []uint, k int, v uint) bool) bool

UintsEvery tests whether all elements in the slice pass the test implemented by the provided function. NOTE:

Calling this method on an empty slice will return true for any condition!

func UintsFill

func UintsFill(u []uint, value uint, start int, end ...int)

UintsFill changes all elements in the current slice to a value, from a start index to an end index. @value

Zero-based index at which to copy the sequence to. If negative, target will be counted from the end.

@start

Zero-based index at which to start copying elements from. If negative, start will be counted from the end.

@end

Zero-based index at which to end copying elements from. CopyWithin copies up to but not including end.
If negative, end will be counted from the end.
If end is omitted, CopyWithin will copy until the last index (default to len(s)).

func UintsFilter

func UintsFilter(u []uint, fn func(u []uint, k int, v uint) bool) []uint

UintsFilter creates a new slice with all elements that pass the test implemented by the provided function.

func UintsFind

func UintsFind(u []uint, fn func(u []uint, k int, v uint) bool) (k int, v uint)

UintsFind returns the key-value of the first element in the provided slice that satisfies the provided testing function. NOTE:

If not found, k = -1

func UintsIncludes

func UintsIncludes(u []uint, valueToFind uint, fromIndex ...int) bool

UintsIncludes determines whether an slice includes a certain value among its entries. @fromIndex

The index to start the search at. Defaults to 0.

func UintsIndexOf

func UintsIndexOf(u []uint, searchElement uint, fromIndex ...int) int

UintsIndexOf returns the first index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func UintsIntersect

func UintsIntersect(u ...[]uint) (intersectCount map[uint]int)

UintsIntersect calculates intersection of two or more slices, and returns the count of each element.

func UintsLastIndexOf

func UintsLastIndexOf(u []uint, searchElement uint, fromIndex ...int) int

UintsLastIndexOf returns the last index at which a given element can be found in the slice, or -1 if it is not present. @fromIndex

The index to start the search at. Defaults to 0.

func UintsMap

func UintsMap(u []uint, fn func(u []uint, k int, v uint) uint) []uint

UintsMap creates a new slice populated with the results of calling a provided function on every element in the calling slice.

func UintsPop

func UintsPop(u *[]uint) (uint, bool)

UintsPop removes the last element from an slice and returns that element. This method changes the length of the slice.

func UintsPush

func UintsPush(u *[]uint, element ...uint) int

UintsPush adds one or more elements to the end of an slice and returns the new length of the slice.

func UintsPushDistinct

func UintsPushDistinct(u []uint, element ...uint) []uint

UintsPushDistinct adds one or more new elements that do not exist in the current slice at the end.

func UintsReduce

func UintsReduce(u []uint,
	fn func(u []uint, k int, v, accumulator uint) uint, initialValue ...uint,
) uint

UintsReduce executes a reducer function (that you provide) on each element of the slice, resulting in a single output value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func UintsReduceRight

func UintsReduceRight(u []uint,
	fn func(u []uint, k int, v, accumulator uint) uint, initialValue ...uint,
) uint

UintsReduceRight applies a function against an accumulator and each value of the slice (from right-to-left) to reduce it to a single value. @accumulator

The accumulator accumulates callback's return values.
It is the accumulated value previously returned in the last invocation of the callback—or initialValue,
if it was supplied (see below).

@initialValue

A value to use as the first argument to the first call of the callback.
If no initialValue is supplied, the first element in the slice will be used and skipped.

func UintsRemoveEvery

func UintsRemoveEvery(p *[]uint, elements ...uint) int

UintsRemoveEvery removes all the elements from the slice, and returns the new length of the slice.

func UintsRemoveFirst

func UintsRemoveFirst(p *[]uint, elements ...uint) int

UintsRemoveFirst removes the first matched elements from the slice, and returns the new length of the slice.

func UintsReverse

func UintsReverse(u []uint)

UintsReverse reverses an slice in place.

func UintsShift

func UintsShift(u *[]uint) (uint, bool)

UintsShift removes the first element from an slice and returns that removed element. This method changes the length of the slice.

func UintsSlice

func UintsSlice(u []uint, begin int, end ...int) []uint

UintsSlice returns a copy of a portion of an slice into a new slice object selected from begin to end (end not included) where begin and end represent the index of items in that slice. The original slice will not be modified.

func UintsSome

func UintsSome(u []uint, fn func(u []uint, k int, v uint) bool) bool

UintsSome tests whether at least one element in the slice passes the test implemented by the provided function. NOTE:

Calling this method on an empty slice returns false for any condition!

func UintsSplice

func UintsSplice(u *[]uint, start, deleteCount int, items ...uint)

UintsSplice changes the contents of an slice by removing or replacing existing elements and/or adding new elements in place.

func UintsToBools

func UintsToBools(u []uint) []bool

UintsToBools converts uint slice to bool slice. NOTE:

0 is false, everything else is true

func UintsToFloat32s

func UintsToFloat32s(u []uint) []float32

UintsToFloat32s converts uint slice to float32 slice.

func UintsToFloat64s

func UintsToFloat64s(u []uint) []float64

UintsToFloat64s converts uint slice to float64 slice.

func UintsToInt16s

func UintsToInt16s(u []uint) ([]int16, error)

UintsToInt16s converts uint slice to int16 slice.

func UintsToInt32s

func UintsToInt32s(u []uint) ([]int32, error)

UintsToInt32s converts uint slice to int32 slice.

func UintsToInt64s

func UintsToInt64s(u []uint) ([]int64, error)

UintsToInt64s converts uint slice to int64 slice.

func UintsToInt8s

func UintsToInt8s(u []uint) ([]int8, error)

UintsToInt8s converts uint slice to int8 slice.

func UintsToInterfaces

func UintsToInterfaces(u []uint) []interface{}

UintsToInterfaces converts uint slice to interface slice.

func UintsToInts

func UintsToInts(u []uint) ([]int, error)

UintsToInts converts uint slice to int slice.

func UintsToStrings

func UintsToStrings(u []uint) []string

UintsToStrings converts uint slice to string slice.

func UintsToUint16s

func UintsToUint16s(u []uint) ([]uint16, error)

UintsToUint16s converts uint slice to uint16 slice.

func UintsToUint32s

func UintsToUint32s(u []uint) ([]uint32, error)

UintsToUint32s converts uint slice to uint32 slice.

func UintsToUint64s

func UintsToUint64s(u []uint) []uint64

UintsToUint64s converts uint slice to uint64 slice.

func UintsToUint8s

func UintsToUint8s(u []uint) ([]uint8, error)

UintsToUint8s converts uint slice to uint8 slice.

func UintsUnshift

func UintsUnshift(u *[]uint, element ...uint) int

UintsUnshift adds one or more elements to the beginning of an slice and returns the new length of the slice.

func UintsUnshiftDistinct

func UintsUnshiftDistinct(u *[]uint, element ...uint) int

UintsUnshiftDistinct adds one or more new elements that do not exist in the current slice to the beginning and returns the new length of the slice.

func UnsafeBytesToString

func UnsafeBytesToString(b []byte) string

UnsafeBytesToString convert []byte type to string type.

func UnsafeStringToBytes

func UnsafeStringToBytes(s string) []byte

UnsafeStringToBytes convert string type to []byte type. NOTE:

panic if modify the member value of the []byte.

Types

type Value

type Value struct {
	// contains filtered or unexported fields
}

Value go underlying type data

func ValueFrom

func ValueFrom(v reflect.Value) Value

ValueFrom gets go underlying type data from reflect.Value.

func ValueFrom2

func ValueFrom2(v *reflect.Value) Value

ValueFrom2 gets go underlying type data from *reflect.Value.

func ValueOf

func ValueOf(i interface{}) Value

ValueOf unpacks i to go underlying type data.

func (Value) CanAddr

func (v Value) CanAddr() bool

CanAddr reports whether the value's address can be obtained with Addr. Such values are called addressable. A value is addressable if it is an element of a slice, an element of an addressable array, a field of an addressable struct, or the result of dereferencing a pointer.

func (Value) Elem

func (v Value) Elem() Value

Elem returns the Value that the interface i contains or that the pointer i points to.

func (Value) FuncForPC

func (v Value) FuncForPC() *runtime.Func

FuncForPC returns a *Func describing the function that contains the given program counter address, or else nil.

If pc represents multiple functions because of inlining, it returns the a *Func describing the innermost function, but with an entry of the outermost function.

NOTE: Its kind must be a reflect.Func, otherwise it returns nil

func (Value) IsNil

func (v Value) IsNil() bool

IsNil reports whether its argument i is nil.

func (Value) Kind

func (v Value) Kind() reflect.Kind

Kind gets the reflect.Kind fastly.

func (Value) Pointer

func (v Value) Pointer() uintptr

Pointer gets the pointer of i. NOTE:

*T and T, gets diffrent pointer

func (Value) RuntimeTypeID

func (v Value) RuntimeTypeID() uintptr

RuntimeTypeID gets the underlying type ID in current runtime. NOTE:

*A and A gets the different runtime type ID;
It is 10 times performance of reflect.TypeOf(i).String().

func (Value) UnderlyingElem

func (v Value) UnderlyingElem() Value

UnderlyingElem returns the underlying Value that the interface i contains or that the pointer i points to.

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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