Documentation
¶
Overview ¶
Package digit
Package digit ¶
Package digit ¶
Package digit ¶
Package digit ¶
Package digit
Index ¶
- func AppendInt(s []int, e int) []int
- func AppendInt8(s []int8, e int8) []int8
- func AppendInt16(s []int16, e int16) []int16
- func AppendInt32(s []int32, e int32) []int32
- func AppendInt64(s []int64, e int64) []int64
- func AppendUint(s []uint, e uint) []uint
- func AppendUint8(s []uint8, e uint8) []uint8
- func AppendUint16(s []uint16, e uint16) []uint16
- func AppendUint32(s []uint32, e uint32) []uint32
- func AppendUint64(s []uint64, e uint64) []uint64
- func BreakUint16(v uint16) (LoByte, HiByte byte)
- func BreakUint32(v uint32) (Byte0, Byte1, Byte2, Byte3 byte)
- func BreakUint64(v uint64) (Lo32, Hi32 uint32)
- func BuildUint16(loByte, HiByte byte) uint16
- func BuildUint32(Byte0, Byte1, Byte2, Byte3 byte) uint32
- func BuildUint64(Lo32, Hi32 uint32) uint64
- func Contain(x interface{}, y []interface{}) bool
- func ContainFloat64(x float64, y []float64) bool
- func ContainInt(x int, y []int) bool
- func ContainInt8(x int8, y []int8) bool
- func ContainInt16(x int16, y []int16) bool
- func ContainInt32(x int32, y []int32) bool
- func ContainInt64(x int64, y []int64) bool
- func ContainUint(x uint, y []uint) bool
- func ContainUint8(x uint8, y []uint8) bool
- func ContainUint16(x uint16, y []uint16) bool
- func ContainUint32(x uint32, y []uint32) bool
- func ContainUint64(x uint64, y []uint64) bool
- func DeleteInt(s []int, e int) []int
- func DeleteInt8(s []int8, e int8) []int8
- func DeleteInt8All(s []int8, e int8) []int8
- func DeleteInt16(s []int16, e int16) []int16
- func DeleteInt16All(s []int16, e int16) []int16
- func DeleteInt32(s []int32, e int32) []int32
- func DeleteInt32All(s []int32, e int32) []int32
- func DeleteInt64(s []int64, e int64) []int64
- func DeleteInt64All(s []int64, e int64) []int64
- func DeleteIntAll(s []int, e int) []int
- func DeleteUint(s []uint, e uint) []uint
- func DeleteUint8(s []uint8, e uint8) []uint8
- func DeleteUint8All(s []uint8, e uint8) []uint8
- func DeleteUint16(s []uint16, e uint16) []uint16
- func DeleteUint16All(s []uint16, e uint16) []uint16
- func DeleteUint32(s []uint32, e uint32) []uint32
- func DeleteUint32All(s []uint32, e uint32) []uint32
- func DeleteUint64(s []uint64, e uint64) []uint64
- func DeleteUint64All(s []uint64, e uint64) []uint64
- func DeleteUintAll(s []uint, e uint) []uint
- func ReverseBytes(b []byte) []byte
- func SearchInt8s(a []int8, x int8) int
- func SearchInt16s(a []int16, x int16) int
- func SearchInt32s(a []int32, x int32) int
- func SearchInt64s(a []int64, x int64) int
- func SearchUint8s(a []uint8, x uint8) int
- func SearchUint16s(a []uint16, x uint16) int
- func SearchUint32s(a []uint32, x uint32) int
- func SearchUint64s(a []uint64, x uint64) int
- func SearchUints(a []uint, x uint) int
- func UniqueFloat64s(a []float64) []float64
- func UniqueInt8s(a []int8) []int8
- func UniqueInt16s(a []int16) []int16
- func UniqueInt32s(a []int32) []int32
- func UniqueInt64s(a []int64) []int64
- func UniqueInts(a []int) []int
- func UniqueUint8s(a []uint8) []uint8
- func UniqueUint16s(a []uint16) []uint16
- func UniqueUint32s(a []uint32) []uint32
- func UniqueUint64s(a []uint64) []uint64
- func UniqueUints(a []uint) []uint
- type Int8Slice
- type Int16Slice
- type Int32Slice
- type Int64Slice
- type Uint8Slice
- type Uint16Slice
- type Uint32Slice
- type Uint64Slice
- type UintSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendInt8 ¶ added in v0.2.2
AppendInt append int8 to slice with no duplicates.
func AppendInt16 ¶ added in v0.2.2
AppendInt16 appends int16 to slice with no duplicates.
func AppendInt32 ¶ added in v0.2.2
AppendInt32 appends int32 to slice with no duplicates.
func AppendInt64 ¶ added in v0.2.2
AppendInt64 appends int64 to slice with no duplicates.
func AppendUint ¶ added in v0.2.2
AppendUint append uint to slice with no duplicates.
func AppendUint8 ¶ added in v0.2.2
AppendUint append uint8 to slice with no duplicates.
func AppendUint16 ¶ added in v0.2.2
AppendUint16 appends uint16 to slice with no duplicates.
func AppendUint32 ¶ added in v0.2.2
AppendUint32 appends uint16 to slice with no duplicates.
func AppendUint64 ¶ added in v0.2.2
AppendUint64 appends int64 to slice with no duplicates.
func BreakUint16 ¶ added in v0.2.2
BreakUint16 break into bytes
func BreakUint32 ¶ added in v0.2.2
BreakUint32 break into bytes
func BreakUint64 ¶ added in v0.2.2
BreakUint64 break into uint32
func BuildUint16 ¶ added in v0.2.2
BuildUint16 combine into uint16
func BuildUint32 ¶ added in v0.2.2
BuildUint32 combine into uint32
func BuildUint64 ¶ added in v0.2.2
BuildUint64 combine into uint64
func Contain ¶
func Contain(x interface{}, y []interface{}) bool
Contain checks if x exists in a slice and returns TRUE if x is found.
func ContainFloat64 ¶
ContainFloat64 checks if x exists in []float64s and returns TRUE if x is found.
func ContainInt ¶
ContainInt checks if x exists in []ints and returns TRUE if x is found.
func ContainInt8 ¶
ContainInt8 checks if x exists in []int8s and returns TRUE if x is found.
func ContainInt16 ¶
ContainInt16 checks if x exists in []int16s and returns TRUE if x is found.
func ContainInt32 ¶
ContainInt32 checks if x exists in []int32s and returns TRUE if x is found.
func ContainInt64 ¶
ContainInt64 checks if x exists in []int64s and returns TRUE if x is found.
func ContainUint ¶
ContainUint checks if x exists in []uints and returns TRUE if x is found.
func ContainUint8 ¶
ContainUint8 checks if x exists in []uint8s and returns TRUE if x is found.
func ContainUint16 ¶
ContainUint16 checks if x exists in []uint16s and returns TRUE if x is found.
func ContainUint32 ¶
ContainUint32 checks if x exists in []uint32s and returns TRUE if x is found.
func ContainUint64 ¶
ContainUint64 checks if x exists in []uint64s and returns TRUE if x is found.
func DeleteInt8 ¶ added in v0.2.2
DeleteInt8 delete an int8 element from slice if it exist
func DeleteInt8All ¶ added in v0.2.2
DeleteInt8All delete all int8 element from slice if it exist
func DeleteInt16 ¶ added in v0.2.2
DeleteInt16 delete an int16 element from slice if it exist
func DeleteInt16All ¶ added in v0.2.2
DeleteInt16All delete all int16 element from slice if it exist
func DeleteInt32 ¶ added in v0.2.2
DeleteInt32 delete an int32 element from slice if it exist
func DeleteInt32All ¶ added in v0.2.2
DeleteInt32All delete all int32 element from slice if it exist
func DeleteInt64 ¶ added in v0.2.2
DeleteInt64 delete an int64 element from slice if it exist
func DeleteInt64All ¶ added in v0.2.2
DeleteInt64All delete all int64 element from slice if it exist
func DeleteIntAll ¶ added in v0.2.2
DeleteIntAll delete all int element from slice if it exist
func DeleteUint ¶ added in v0.2.2
DeleteUint delete an uint element from slice if it exist
func DeleteUint8 ¶ added in v0.2.2
DeleteUint8 delete an uint8 element from slice if it exist
func DeleteUint8All ¶ added in v0.2.2
DeleteUint8All delete all uint8 element from slice if it exist
func DeleteUint16 ¶ added in v0.2.2
DeleteUint16 delete an uint16 element from slice if it exist
func DeleteUint16All ¶ added in v0.2.2
DeleteUint16All delete all uint16 element from slice if it exist
func DeleteUint32 ¶ added in v0.2.2
DeleteUint32 delete an uint32 element from slice if it exist
func DeleteUint32All ¶ added in v0.2.2
DeleteUint32All delete all uint32 element from slice if it exist
func DeleteUint64 ¶ added in v0.2.2
DeleteUint64 delete an uint64 element from slice if it exist
func DeleteUint64All ¶ added in v0.2.2
DeleteUint64All delete all uint64 element from slice if it exist
func DeleteUintAll ¶ added in v0.2.2
DeleteUintAll delete all uint element from slice if it exist
func SearchInt8s ¶
SearchInt8s searches for x in a sorted slice of int8s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchInt16s ¶
SearchInt16s searches for x in a sorted slice of int16s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchInt32s ¶
SearchInt32s searches for x in a sorted slice of int32s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchInt64s ¶
SearchInt64s searches for x in a sorted slice of int64s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUint8s ¶
SearchUint8s searches for x in a sorted slice of uint8s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUint16s ¶
SearchUint16s searches for x in a sorted slice of uint16s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUint32s ¶
SearchUint32s searches for x in a sorted slice of uint32s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUint64s ¶
SearchUint64s searches for x in a sorted slice of uint64s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func SearchUints ¶
SearchUints searches for x in a sorted slice of uints and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.
func UniqueFloat64s ¶
UniqueFloat64s takes an input slice of float64s and returns a new slice of float64s without duplicate values.
func UniqueInt8s ¶
UniqueInt8s takes an input slice of int8s and returns a new slice of int8s without duplicate values.
func UniqueInt16s ¶
UniqueInt16s takes an input slice of int16s and returns a new slice of int16s without duplicate values.
func UniqueInt32s ¶
UniqueInt32s takes an input slice of int32s and returns a new slice of int32s without duplicate values.
func UniqueInt64s ¶
UniqueInt64s takes an input slice of int64s and returns a new slice of int64s without duplicate values.
func UniqueInts ¶
UniqueInts takes an input slice of ints and returns a new slice of ints without duplicate values.
func UniqueUint8s ¶
UniqueUint8s takes an input slice of uint8s and returns a new slice of uint8s without duplicate values.
func UniqueUint16s ¶
UniqueUint16s takes an input slice of uint16s and returns a new slice of uint16s without duplicate values.
func UniqueUint32s ¶
UniqueUint32s takes an input slice of uint32s and returns a new slice of uint32s without duplicate values.
func UniqueUint64s ¶
UniqueUint64s takes an input slice of uint64s and returns a new slice of uint64s without duplicate values.
func UniqueUints ¶
UniqueUints takes an input slice of uints and returns a new slice of uints without duplicate values.
Types ¶
type Int8Slice ¶
type Int8Slice []int8
Int8Slice attaches the methods of Interface to []int8, sorting a increasing order.
type Int16Slice ¶
type Int16Slice []int16
Int16Slice attaches the methods of Interface to []int16, sorting a increasing order.
func (Int16Slice) Len ¶
func (p Int16Slice) Len() int
func (Int16Slice) Less ¶
func (p Int16Slice) Less(i, j int) bool
func (Int16Slice) Search ¶
func (p Int16Slice) Search(x int16) int
Search returns the result of applying SearchInts to the receiver and x.
func (Int16Slice) Swap ¶
func (p Int16Slice) Swap(i, j int)
type Int32Slice ¶
type Int32Slice []int32
Int32Slice attaches the methods of Interface to []int32, sorting a increasing order.
func (Int32Slice) Len ¶
func (p Int32Slice) Len() int
func (Int32Slice) Less ¶
func (p Int32Slice) Less(i, j int) bool
func (Int32Slice) Search ¶
func (p Int32Slice) Search(x int32) int
Search returns the result of applying SearchInts to the receiver and x.
func (Int32Slice) Swap ¶
func (p Int32Slice) Swap(i, j int)
type Int64Slice ¶
type Int64Slice []int64
Int64Slice attaches the methods of Interface to []int64, sorting a increasing order.
func (Int64Slice) Len ¶
func (p Int64Slice) Len() int
func (Int64Slice) Less ¶
func (p Int64Slice) Less(i, j int) bool
func (Int64Slice) Search ¶
func (p Int64Slice) Search(x int64) int
Search returns the result of applying SearchInts to the receiver and x.
func (Int64Slice) Swap ¶
func (p Int64Slice) Swap(i, j int)
type Uint8Slice ¶
type Uint8Slice []uint8
Uint8Slice attaches the methods of Interface to []uint8, sorting a increasing order.
func (Uint8Slice) Len ¶
func (p Uint8Slice) Len() int
func (Uint8Slice) Less ¶
func (p Uint8Slice) Less(i, j int) bool
func (Uint8Slice) Search ¶
func (p Uint8Slice) Search(x uint8) int
Search returns the result of applying SearchInts to the receiver and x.
func (Uint8Slice) Swap ¶
func (p Uint8Slice) Swap(i, j int)
type Uint16Slice ¶
type Uint16Slice []uint16
Uint16Slice attaches the methods of Interface to []uint16, sorting a increasing order.
func (Uint16Slice) Len ¶
func (p Uint16Slice) Len() int
func (Uint16Slice) Less ¶
func (p Uint16Slice) Less(i, j int) bool
func (Uint16Slice) Search ¶
func (p Uint16Slice) Search(x uint16) int
Search returns the result of applying SearchInts to the receiver and x.
func (Uint16Slice) Swap ¶
func (p Uint16Slice) Swap(i, j int)
type Uint32Slice ¶
type Uint32Slice []uint32
Uint32Slice attaches the methods of Interface to []uint, sorting a increasing order.
func (Uint32Slice) Len ¶
func (p Uint32Slice) Len() int
func (Uint32Slice) Less ¶
func (p Uint32Slice) Less(i, j int) bool
func (Uint32Slice) Search ¶
func (p Uint32Slice) Search(x uint32) int
Search returns the result of applying SearchInts to the receiver and x.
func (Uint32Slice) Swap ¶
func (p Uint32Slice) Swap(i, j int)
type Uint64Slice ¶
type Uint64Slice []uint64
Uint64Slice attaches the methods of Interface to []uint64, sorting a increasing order.
func (Uint64Slice) Len ¶
func (p Uint64Slice) Len() int
func (Uint64Slice) Less ¶
func (p Uint64Slice) Less(i, j int) bool
func (Uint64Slice) Search ¶
func (p Uint64Slice) Search(x uint64) int
Search returns the result of applying SearchInts to the receiver and x.
func (Uint64Slice) Swap ¶
func (p Uint64Slice) Swap(i, j int)