digit

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package digit

Package digit

Package digit

Package digit

Package digit

Package digit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendInt added in v0.2.2

func AppendInt(s []int, e int) []int

AppendInt append int to slice with no duplicates.

func AppendInt8 added in v0.2.2

func AppendInt8(s []int8, e int8) []int8

AppendInt append int8 to slice with no duplicates.

func AppendInt16 added in v0.2.2

func AppendInt16(s []int16, e int16) []int16

AppendInt16 appends int16 to slice with no duplicates.

func AppendInt32 added in v0.2.2

func AppendInt32(s []int32, e int32) []int32

AppendInt32 appends int32 to slice with no duplicates.

func AppendInt64 added in v0.2.2

func AppendInt64(s []int64, e int64) []int64

AppendInt64 appends int64 to slice with no duplicates.

func AppendUint added in v0.2.2

func AppendUint(s []uint, e uint) []uint

AppendUint append uint to slice with no duplicates.

func AppendUint8 added in v0.2.2

func AppendUint8(s []uint8, e uint8) []uint8

AppendUint append uint8 to slice with no duplicates.

func AppendUint16 added in v0.2.2

func AppendUint16(s []uint16, e uint16) []uint16

AppendUint16 appends uint16 to slice with no duplicates.

func AppendUint32 added in v0.2.2

func AppendUint32(s []uint32, e uint32) []uint32

AppendUint32 appends uint16 to slice with no duplicates.

func AppendUint64 added in v0.2.2

func AppendUint64(s []uint64, e uint64) []uint64

AppendUint64 appends int64 to slice with no duplicates.

func BreakUint16 added in v0.2.2

func BreakUint16(v uint16) (LoByte, HiByte byte)

BreakUint16 break into bytes

func BreakUint32 added in v0.2.2

func BreakUint32(v uint32) (Byte0, Byte1, Byte2, Byte3 byte)

BreakUint32 break into bytes

func BreakUint64 added in v0.2.2

func BreakUint64(v uint64) (Lo32, Hi32 uint32)

BreakUint64 break into uint32

func BuildUint16 added in v0.2.2

func BuildUint16(loByte, HiByte byte) uint16

BuildUint16 combine into uint16

func BuildUint32 added in v0.2.2

func BuildUint32(Byte0, Byte1, Byte2, Byte3 byte) uint32

BuildUint32 combine into uint32

func BuildUint64 added in v0.2.2

func BuildUint64(Lo32, Hi32 uint32) uint64

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

func ContainFloat64(x float64, y []float64) bool

ContainFloat64 checks if x exists in []float64s and returns TRUE if x is found.

func ContainInt

func ContainInt(x int, y []int) bool

ContainInt checks if x exists in []ints and returns TRUE if x is found.

func ContainInt8

func ContainInt8(x int8, y []int8) bool

ContainInt8 checks if x exists in []int8s and returns TRUE if x is found.

func ContainInt16

func ContainInt16(x int16, y []int16) bool

ContainInt16 checks if x exists in []int16s and returns TRUE if x is found.

func ContainInt32

func ContainInt32(x int32, y []int32) bool

ContainInt32 checks if x exists in []int32s and returns TRUE if x is found.

func ContainInt64

func ContainInt64(x int64, y []int64) bool

ContainInt64 checks if x exists in []int64s and returns TRUE if x is found.

func ContainUint

func ContainUint(x uint, y []uint) bool

ContainUint checks if x exists in []uints and returns TRUE if x is found.

func ContainUint8

func ContainUint8(x uint8, y []uint8) bool

ContainUint8 checks if x exists in []uint8s and returns TRUE if x is found.

func ContainUint16

func ContainUint16(x uint16, y []uint16) bool

ContainUint16 checks if x exists in []uint16s and returns TRUE if x is found.

func ContainUint32

func ContainUint32(x uint32, y []uint32) bool

ContainUint32 checks if x exists in []uint32s and returns TRUE if x is found.

func ContainUint64

func ContainUint64(x uint64, y []uint64) bool

ContainUint64 checks if x exists in []uint64s and returns TRUE if x is found.

func DeleteInt added in v0.2.2

func DeleteInt(s []int, e int) []int

DeleteInt delete an int element from slice if it exist

func DeleteInt8 added in v0.2.2

func DeleteInt8(s []int8, e int8) []int8

DeleteInt8 delete an int8 element from slice if it exist

func DeleteInt8All added in v0.2.2

func DeleteInt8All(s []int8, e int8) []int8

DeleteInt8All delete all int8 element from slice if it exist

func DeleteInt16 added in v0.2.2

func DeleteInt16(s []int16, e int16) []int16

DeleteInt16 delete an int16 element from slice if it exist

func DeleteInt16All added in v0.2.2

func DeleteInt16All(s []int16, e int16) []int16

DeleteInt16All delete all int16 element from slice if it exist

func DeleteInt32 added in v0.2.2

func DeleteInt32(s []int32, e int32) []int32

DeleteInt32 delete an int32 element from slice if it exist

func DeleteInt32All added in v0.2.2

func DeleteInt32All(s []int32, e int32) []int32

DeleteInt32All delete all int32 element from slice if it exist

func DeleteInt64 added in v0.2.2

func DeleteInt64(s []int64, e int64) []int64

DeleteInt64 delete an int64 element from slice if it exist

func DeleteInt64All added in v0.2.2

func DeleteInt64All(s []int64, e int64) []int64

DeleteInt64All delete all int64 element from slice if it exist

func DeleteIntAll added in v0.2.2

func DeleteIntAll(s []int, e int) []int

DeleteIntAll delete all int element from slice if it exist

func DeleteUint added in v0.2.2

func DeleteUint(s []uint, e uint) []uint

DeleteUint delete an uint element from slice if it exist

func DeleteUint8 added in v0.2.2

func DeleteUint8(s []uint8, e uint8) []uint8

DeleteUint8 delete an uint8 element from slice if it exist

func DeleteUint8All added in v0.2.2

func DeleteUint8All(s []uint8, e uint8) []uint8

DeleteUint8All delete all uint8 element from slice if it exist

func DeleteUint16 added in v0.2.2

func DeleteUint16(s []uint16, e uint16) []uint16

DeleteUint16 delete an uint16 element from slice if it exist

func DeleteUint16All added in v0.2.2

func DeleteUint16All(s []uint16, e uint16) []uint16

DeleteUint16All delete all uint16 element from slice if it exist

func DeleteUint32 added in v0.2.2

func DeleteUint32(s []uint32, e uint32) []uint32

DeleteUint32 delete an uint32 element from slice if it exist

func DeleteUint32All added in v0.2.2

func DeleteUint32All(s []uint32, e uint32) []uint32

DeleteUint32All delete all uint32 element from slice if it exist

func DeleteUint64 added in v0.2.2

func DeleteUint64(s []uint64, e uint64) []uint64

DeleteUint64 delete an uint64 element from slice if it exist

func DeleteUint64All added in v0.2.2

func DeleteUint64All(s []uint64, e uint64) []uint64

DeleteUint64All delete all uint64 element from slice if it exist

func DeleteUintAll added in v0.2.2

func DeleteUintAll(s []uint, e uint) []uint

DeleteUintAll delete all uint element from slice if it exist

func ReverseBytes added in v0.2.2

func ReverseBytes(b []byte) []byte

ReverseBytes reverse []byte

func SearchInt8s

func SearchInt8s(a []int8, x int8) int

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

func SearchInt16s(a []int16, x int16) int

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

func SearchInt32s(a []int32, x int32) int

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

func SearchInt64s(a []int64, x int64) int

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

func SearchUint8s(a []uint8, x uint8) int

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

func SearchUint16s(a []uint16, x uint16) int

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

func SearchUint32s(a []uint32, x uint32) int

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

func SearchUint64s(a []uint64, x uint64) int

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

func SearchUints(a []uint, x uint) int

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

func UniqueFloat64s(a []float64) []float64

UniqueFloat64s takes an input slice of float64s and returns a new slice of float64s without duplicate values.

func UniqueInt8s

func UniqueInt8s(a []int8) []int8

UniqueInt8s takes an input slice of int8s and returns a new slice of int8s without duplicate values.

func UniqueInt16s

func UniqueInt16s(a []int16) []int16

UniqueInt16s takes an input slice of int16s and returns a new slice of int16s without duplicate values.

func UniqueInt32s

func UniqueInt32s(a []int32) []int32

UniqueInt32s takes an input slice of int32s and returns a new slice of int32s without duplicate values.

func UniqueInt64s

func UniqueInt64s(a []int64) []int64

UniqueInt64s takes an input slice of int64s and returns a new slice of int64s without duplicate values.

func UniqueInts

func UniqueInts(a []int) []int

UniqueInts takes an input slice of ints and returns a new slice of ints without duplicate values.

func UniqueUint8s

func UniqueUint8s(a []uint8) []uint8

UniqueUint8s takes an input slice of uint8s and returns a new slice of uint8s without duplicate values.

func UniqueUint16s

func UniqueUint16s(a []uint16) []uint16

UniqueUint16s takes an input slice of uint16s and returns a new slice of uint16s without duplicate values.

func UniqueUint32s

func UniqueUint32s(a []uint32) []uint32

UniqueUint32s takes an input slice of uint32s and returns a new slice of uint32s without duplicate values.

func UniqueUint64s

func UniqueUint64s(a []uint64) []uint64

UniqueUint64s takes an input slice of uint64s and returns a new slice of uint64s without duplicate values.

func UniqueUints

func UniqueUints(a []uint) []uint

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.

func (Int8Slice) Len

func (p Int8Slice) Len() int

func (Int8Slice) Less

func (p Int8Slice) Less(i, j int) bool

func (Int8Slice) Search

func (p Int8Slice) Search(x int8) int

Search returns the result of applying SearchInts to the receiver and x.

func (Int8Slice) Sort

func (p Int8Slice) Sort()

Sort is a convenience method.

func (Int8Slice) Swap

func (p Int8Slice) Swap(i, j int)

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) Sort

func (p Int16Slice) Sort()

Sort is a convenience method.

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) Sort

func (p Int32Slice) Sort()

Sort is a convenience method.

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) Sort

func (p Int64Slice) Sort()

Sort is a convenience method.

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) Sort

func (p Uint8Slice) Sort()

Sort is a convenience method.

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) Sort

func (p Uint16Slice) Sort()

Sort is a convenience method.

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) Sort

func (p Uint32Slice) Sort()

Sort is a convenience method.

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) Sort

func (p Uint64Slice) Sort()

Sort is a convenience method.

func (Uint64Slice) Swap

func (p Uint64Slice) Swap(i, j int)

type UintSlice

type UintSlice []uint

UintSlice attaches the methods of Interface to []uint, sorting a increasing order.

func (UintSlice) Len

func (p UintSlice) Len() int

func (UintSlice) Less

func (p UintSlice) Less(i, j int) bool

func (UintSlice) Search

func (p UintSlice) Search(x uint) int

Search returns the result of applying SearchInts to the receiver and x.

func (UintSlice) Sort

func (p UintSlice) Sort()

Sort is a convenience method.

func (UintSlice) Swap

func (p UintSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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