simpleton

package
v0.0.0-...-6244057 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: AGPL-3.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteChannelToList

func ByteChannelToList(channel <-chan byte) (list []byte)

read from a channel, wait till its closed and return all read items

func ByteListToChannel

func ByteListToChannel(list ...byte) <-chan byte

give back a channel in which to push items of a list of byte in a separate goroutine

func ByteSliceToStringSlice

func ByteSliceToStringSlice(bc ...[]byte) (s []string)

converts []byte slice to string slice

func BytesEqual

func BytesEqual(b, p []byte, start int) bool

func BytesListToChannel

func BytesListToChannel(list [][]byte) <-chan []byte

give back a channel in which to push items of a list of []byte in a separate goroutine

func BytesToString

func BytesToString(b []byte) string

Quick copy

func CharsEqual

func CharsEqual(r, rp string, start int) bool

func CompareAndSwap

func CompareAndSwap(values ...interface{})

* CompareAndSwap compares values from right * to left and swaps them if they are not equal * or t1 is nil * * Arrays and Slices must have same length * * Structs are only compareable if * Struct1.Field(i).Type() == Struct2.Field(i).Type()

func Complex128ChannelToList

func Complex128ChannelToList(channel <-chan complex128) (list []complex128)

read from a channel, wait till its closed and return all read items

func Complex128ListToChannel

func Complex128ListToChannel(list ...complex128) <-chan complex128

give back a channel in which to push items of a list of complex128 in a separate goroutine

func Complex64ChannelToList

func Complex64ChannelToList(channel <-chan complex64) (list []complex64)

read from a channel, wait till its closed and return all read items

func Complex64ListToChannel

func Complex64ListToChannel(list ...complex64) <-chan complex64

give back a channel in which to push items of a list of complex64 in a separate goroutine

func FirstBytesEqual

func FirstBytesEqual(b, p []byte) bool

func FirstCharEqualAppend

func FirstCharEqualAppend(s, ss, sss string) string

compare last char of s to ss, if equal append sss

func FirstCharNotEqualAppend

func FirstCharNotEqualAppend(s, ss, sss string) string

compare first char of s to ss, if not equal append sss

func FirstCharsEqual

func FirstCharsEqual(s, p string) bool

func Float32ChannelToList

func Float32ChannelToList(channel <-chan float32) (list []float32)

read from a channel, wait till its closed and return all read items

func Float32ListToChannel

func Float32ListToChannel(list ...float32) <-chan float32

give back a channel in which to push items of a list of float32 in a separate goroutine

func Float64ChannelToList

func Float64ChannelToList(channel <-chan float64) (list []float64)

read from a channel, wait till its closed and return all read items

func Float64ListToChannel

func Float64ListToChannel(list ...float64) <-chan float64

give back a channel in which to push items of a list of float64 in a separate goroutine

func GetBytes

func GetBytes(b []byte, i, j int) []byte

func GetChars

func GetChars(r string, i, j int) string

func GetFirstByte

func GetFirstByte(b []byte) []byte

func GetFirstBytes

func GetFirstBytes(b []byte, n int) []byte

func GetFirstChar

func GetFirstChar(r string) string

func GetFirstChars

func GetFirstChars(r string, n int) string

func GetLastByte

func GetLastByte(b []byte) []byte

func GetLastBytes

func GetLastBytes(b []byte, n int) []byte

func GetLastChar

func GetLastChar(r string) string

func GetLastChars

func GetLastChars(r string, n int) string

func GetLongestByte

func GetLongestByte(b ...[]byte) []byte

func GetLongestByteLength

func GetLongestByteLength(b ...[]byte) (max, index int)

func GetLongestString

func GetLongestString(s ...string) string

func GetLongestStringLength

func GetLongestStringLength(s ...string) (max, index int)

func GetShortestByte

func GetShortestByte(b ...[]byte) []byte

func GetShortestByteLength

func GetShortestByteLength(b ...[]byte) (min, index int)

func GetShortestString

func GetShortestString(s ...string) string

func GetShortestStringLength

func GetShortestStringLength(s ...string) (min, index int)

func GetSumOfBytes

func GetSumOfBytes(of ...[]byte) uint64

get the sum of bytes in a non-nested []byte slice

func GetSumOfBytesTrimOuter

func GetSumOfBytesTrimOuter(of ...[]byte) uint64

get the sum of bytes in a non-nested byte slice trims first and last element

func GetSumOfStrings

func GetSumOfStrings(of ...string) uint64

get the sum of strings in a non-nested string slice

func GetSumOfStringsTrimOuter

func GetSumOfStringsTrimOuter(of ...string) uint64

get the sum of strings in a non-nested string slice trims first and last element

func HasKeyByte

func HasKeyByte(a []byte, k int) (b bool)

func HasKeyComplex128

func HasKeyComplex128(a []complex128, k int) (b bool)

func HasKeyComplex64

func HasKeyComplex64(a []complex64, k int) (b bool)

func HasKeyFloat32

func HasKeyFloat32(a []float32, k int) (b bool)

func HasKeyFloat64

func HasKeyFloat64(a []float64, k int) (b bool)

func HasKeyInt

func HasKeyInt(a []int, k int) (b bool)

func HasKeyInt16

func HasKeyInt16(a []int16, k int) (b bool)

func HasKeyInt32

func HasKeyInt32(a []int32, k int) (b bool)

func HasKeyInt64

func HasKeyInt64(a []int64, k int) (b bool)

func HasKeyInt8

func HasKeyInt8(a []int8, k int) (b bool)

func HasKeyRune

func HasKeyRune(a []rune, k int) (b bool)

func HasKeyString

func HasKeyString(a []string, k int) (b bool)

func HasKeyUint

func HasKeyUint(a []uint, k int) (b bool)

func HasKeyUint16

func HasKeyUint16(a []uint16, k int) (b bool)

func HasKeyUint32

func HasKeyUint32(a []uint32, k int) (b bool)

func HasKeyUint64

func HasKeyUint64(a []uint64, k int) (b bool)

func HasKeyUint8

func HasKeyUint8(a []uint8, k int) (b bool)

func InsertAfterLastByte

func InsertAfterLastByte(b, n []byte) []byte

func InsertAfterLastChar

func InsertAfterLastChar(s, n string) string

func InsertBeforeFirstByte

func InsertBeforeFirstByte(b, n []byte) []byte

func InsertBeforeFirstChar

func InsertBeforeFirstChar(s, n string) string

func InsertBytes

func InsertBytes(b, n []byte, i int) []byte

func InsertString

func InsertString(s, n string, i int) string

func Int16ChannelToList

func Int16ChannelToList(channel <-chan int16) (list []int16)

read from a channel, wait till its closed and return all read items

func Int16ListToChannel

func Int16ListToChannel(list ...int16) <-chan int16

give back a channel in which to push items of a list of int16 in a separate goroutine

func Int32ChannelToList

func Int32ChannelToList(channel <-chan int32) (list []int32)

read from a channel, wait till its closed and return all read items

func Int32ListToChannel

func Int32ListToChannel(list ...int32) <-chan int32

give back a channel in which to push items of a list of int32 in a separate goroutine

func Int64ChannelToList

func Int64ChannelToList(channel <-chan int64) (list []int64)

read from a channel, wait till its closed and return all read items

func Int64ListToChannel

func Int64ListToChannel(list ...int64) <-chan int64

give back a channel in which to push items of a list of int64 in a separate goroutine

func Int8ChannelToList

func Int8ChannelToList(channel <-chan int8) (list []int8)

read from a channel, wait till its closed and return all read items

func Int8ListToChannel

func Int8ListToChannel(list ...int8) <-chan int8

give back a channel in which to push items of a list of int8 in a separate goroutine

func IntChannelToList

func IntChannelToList(channel <-chan int) (list []int)

read from a channel, wait till its closed and return all read items

func IntListToChannel

func IntListToChannel(list ...int) <-chan int

give back a channel in which to push items of a list of int in a separate goroutine

func LastBytesEqual

func LastBytesEqual(b, p []byte) bool

func LastCharEqualAppend

func LastCharEqualAppend(s, ss, sss string) string

compare last char of s to ss, if equal append sss

func LastCharNotEqualAppend

func LastCharNotEqualAppend(s, ss, sss string) string

compare last char of s to ss, if not equal append sss

func LastCharsEqual

func LastCharsEqual(s, p string) bool

func Length

func Length(r string) int

func RemoveBytes

func RemoveBytes(b []byte, i, j int) []byte

func RemoveBytesByBytes

func RemoveBytesByBytes(b []byte, i int, n []byte) []byte

func RemoveChars

func RemoveChars(s string, i, j int) string

func RemoveCharsByString

func RemoveCharsByString(s string, i int, n string) string

func RemoveFirstBytes

func RemoveFirstBytes(b []byte, n int) []byte

func RemoveFirstBytesByBytes

func RemoveFirstBytesByBytes(b, n []byte) []byte

func RemoveFirstChars

func RemoveFirstChars(r string, n int) string

func RemoveFirstCharsByString

func RemoveFirstCharsByString(s, n string) string

func RemoveFirstCharsIfEqual

func RemoveFirstCharsIfEqual(s string, ss ...string) string

func RemoveLastBytes

func RemoveLastBytes(b []byte, n int) []byte

func RemoveLastBytesByBytes

func RemoveLastBytesByBytes(b, n []byte) []byte

func RemoveLastChars

func RemoveLastChars(r string, n int) string

func RemoveLastCharsByString

func RemoveLastCharsByString(s, n string) string

func RemoveLastCharsIfEqual

func RemoveLastCharsIfEqual(s string, ss ...string) string

func RuneChannelToList

func RuneChannelToList(channel <-chan rune) (list []rune)

read from a channel, wait till its closed and return all read items

func RuneListToChannel

func RuneListToChannel(list ...rune) <-chan rune

give back a channel in which to push items of a list of rune in a separate goroutine

func SliceByteCut

func SliceByteCut(a []byte, i, j int) []byte

func SliceByteDelete

func SliceByteDelete(a []byte, i int) []byte

func SliceByteEqual

func SliceByteEqual(a, to []byte) bool

func SliceByteExactlyEqual

func SliceByteExactlyEqual(a, to []byte) bool

func SliceByteInsert

func SliceByteInsert(a []byte, what byte, i int) []byte

func SliceBytePop

func SliceBytePop(a []byte) (byte, []byte)

func SliceBytePush

func SliceBytePush(a []byte, x byte) []byte

func SliceComplex128Cut

func SliceComplex128Cut(a []complex128, i, j int) []complex128

func SliceComplex128Delete

func SliceComplex128Delete(a []complex128, i int) []complex128

func SliceComplex128Equal

func SliceComplex128Equal(a, to []complex128) bool

func SliceComplex128ExactlyEqual

func SliceComplex128ExactlyEqual(a, to []complex128) bool

func SliceComplex128Insert

func SliceComplex128Insert(a []complex128, what complex128, i int) []complex128

func SliceComplex128Pop

func SliceComplex128Pop(a []complex128) (complex128, []complex128)

func SliceComplex128Push

func SliceComplex128Push(a []complex128, x complex128) []complex128

func SliceComplex64Cut

func SliceComplex64Cut(a []complex64, i, j int) []complex64

func SliceComplex64Delete

func SliceComplex64Delete(a []complex64, i int) []complex64

func SliceComplex64Equal

func SliceComplex64Equal(a, to []complex64) bool

func SliceComplex64ExactlyEqual

func SliceComplex64ExactlyEqual(a, to []complex64) bool

func SliceComplex64Insert

func SliceComplex64Insert(a []complex64, what complex64, i int) []complex64

func SliceComplex64Pop

func SliceComplex64Pop(a []complex64) (complex64, []complex64)

func SliceComplex64Push

func SliceComplex64Push(a []complex64, x complex64) []complex64

func SliceFloat32Cut

func SliceFloat32Cut(a []float32, i, j int) []float32

func SliceFloat32Delete

func SliceFloat32Delete(a []float32, i int) []float32

func SliceFloat32Equal

func SliceFloat32Equal(a, to []float32) bool

func SliceFloat32ExactlyEqual

func SliceFloat32ExactlyEqual(a, to []float32) bool

func SliceFloat32Insert

func SliceFloat32Insert(a []float32, what float32, i int) []float32

func SliceFloat32Pop

func SliceFloat32Pop(a []float32) (float32, []float32)

func SliceFloat32Push

func SliceFloat32Push(a []float32, x float32) []float32

func SliceFloat64Cut

func SliceFloat64Cut(a []float64, i, j int) []float64

func SliceFloat64Delete

func SliceFloat64Delete(a []float64, i int) []float64

func SliceFloat64Equal

func SliceFloat64Equal(a, to []float64) bool

func SliceFloat64ExactlyEqual

func SliceFloat64ExactlyEqual(a, to []float64) bool

func SliceFloat64Insert

func SliceFloat64Insert(a []float64, what float64, i int) []float64

func SliceFloat64Pop

func SliceFloat64Pop(a []float64) (float64, []float64)

func SliceFloat64Push

func SliceFloat64Push(a []float64, x float64) []float64

func SliceInt16Cut

func SliceInt16Cut(a []int16, i, j int) []int16

func SliceInt16Delete

func SliceInt16Delete(a []int16, i int) []int16

func SliceInt16Equal

func SliceInt16Equal(a, to []int16) bool

func SliceInt16ExactlyEqual

func SliceInt16ExactlyEqual(a, to []int16) bool

func SliceInt16Insert

func SliceInt16Insert(a []int16, what int16, i int) []int16

func SliceInt16Pop

func SliceInt16Pop(a []int16) (int16, []int16)

func SliceInt16Push

func SliceInt16Push(a []int16, x int16) []int16

func SliceInt32Cut

func SliceInt32Cut(a []int32, i, j int) []int32

func SliceInt32Delete

func SliceInt32Delete(a []int32, i int) []int32

func SliceInt32Equal

func SliceInt32Equal(a, to []int32) bool

func SliceInt32ExactlyEqual

func SliceInt32ExactlyEqual(a, to []int32) bool

func SliceInt32Insert

func SliceInt32Insert(a []int32, what int32, i int) []int32

func SliceInt32Pop

func SliceInt32Pop(a []int32) (int32, []int32)

func SliceInt32Push

func SliceInt32Push(a []int32, x int32) []int32

func SliceInt64Cut

func SliceInt64Cut(a []int64, i, j int) []int64

func SliceInt64Delete

func SliceInt64Delete(a []int64, i int) []int64

func SliceInt64Equal

func SliceInt64Equal(a, to []int64) bool

func SliceInt64ExactlyEqual

func SliceInt64ExactlyEqual(a, to []int64) bool

func SliceInt64Insert

func SliceInt64Insert(a []int64, what int64, i int) []int64

func SliceInt64Pop

func SliceInt64Pop(a []int64) (int64, []int64)

func SliceInt64Push

func SliceInt64Push(a []int64, x int64) []int64

func SliceInt8Cut

func SliceInt8Cut(a []int8, i, j int) []int8

func SliceInt8Delete

func SliceInt8Delete(a []int8, i int) []int8

func SliceInt8Equal

func SliceInt8Equal(a, to []int8) bool

func SliceInt8ExactlyEqual

func SliceInt8ExactlyEqual(a, to []int8) bool

func SliceInt8Insert

func SliceInt8Insert(a []int8, what int8, i int) []int8

func SliceInt8Pop

func SliceInt8Pop(a []int8) (int8, []int8)

func SliceInt8Push

func SliceInt8Push(a []int8, x int8) []int8

func SliceIntCut

func SliceIntCut(a []int, i, j int) []int

func SliceIntDelete

func SliceIntDelete(a []int, i int) []int

func SliceIntEqual

func SliceIntEqual(a, to []int) bool

func SliceIntExactlyEqual

func SliceIntExactlyEqual(a, to []int) bool

func SliceIntInsert

func SliceIntInsert(a []int, what int, i int) []int

func SliceIntPop

func SliceIntPop(a []int) (int, []int)

func SliceIntPush

func SliceIntPush(a []int, x int) []int

func SliceRuneCut

func SliceRuneCut(a []rune, i, j int) []rune

func SliceRuneDelete

func SliceRuneDelete(a []rune, i int) []rune

func SliceRuneEqual

func SliceRuneEqual(a, to []rune) bool

func SliceRuneExactlyEqual

func SliceRuneExactlyEqual(a, to []rune) bool

func SliceRuneInsert

func SliceRuneInsert(a []rune, what rune, i int) []rune

func SliceRunePop

func SliceRunePop(a []rune) (rune, []rune)

func SliceRunePush

func SliceRunePush(a []rune, x rune) []rune

func SliceStringCut

func SliceStringCut(a []string, i, j int) []string

func SliceStringDelete

func SliceStringDelete(a []string, i int) []string

func SliceStringEqual

func SliceStringEqual(a, to []string) bool

func SliceStringExactlyEqual

func SliceStringExactlyEqual(a, to []string) bool

func SliceStringInsert

func SliceStringInsert(a []string, what string, i int) []string

func SliceStringPop

func SliceStringPop(a []string) (string, []string)

func SliceStringPush

func SliceStringPush(a []string, x string) []string

func SliceUint16Cut

func SliceUint16Cut(a []uint16, i, j int) []uint16

func SliceUint16Delete

func SliceUint16Delete(a []uint16, i int) []uint16

func SliceUint16Equal

func SliceUint16Equal(a, to []uint16) bool

func SliceUint16ExactlyEqual

func SliceUint16ExactlyEqual(a, to []uint16) bool

func SliceUint16Insert

func SliceUint16Insert(a []uint16, what uint16, i int) []uint16

func SliceUint16Pop

func SliceUint16Pop(a []uint16) (uint16, []uint16)

func SliceUint16Push

func SliceUint16Push(a []uint16, x uint16) []uint16

func SliceUint32Cut

func SliceUint32Cut(a []uint32, i, j int) []uint32

func SliceUint32Delete

func SliceUint32Delete(a []uint32, i int) []uint32

func SliceUint32Equal

func SliceUint32Equal(a, to []uint32) bool

func SliceUint32ExactlyEqual

func SliceUint32ExactlyEqual(a, to []uint32) bool

func SliceUint32Insert

func SliceUint32Insert(a []uint32, what uint32, i int) []uint32

func SliceUint32Pop

func SliceUint32Pop(a []uint32) (uint32, []uint32)

func SliceUint32Push

func SliceUint32Push(a []uint32, x uint32) []uint32

func SliceUint64Cut

func SliceUint64Cut(a []uint64, i, j int) []uint64

func SliceUint64Delete

func SliceUint64Delete(a []uint64, i int) []uint64

func SliceUint64Equal

func SliceUint64Equal(a, to []uint64) bool

func SliceUint64ExactlyEqual

func SliceUint64ExactlyEqual(a, to []uint64) bool

func SliceUint64Insert

func SliceUint64Insert(a []uint64, what uint64, i int) []uint64

func SliceUint64Pop

func SliceUint64Pop(a []uint64) (uint64, []uint64)

func SliceUint64Push

func SliceUint64Push(a []uint64, x uint64) []uint64

func SliceUint8Cut

func SliceUint8Cut(a []uint8, i, j int) []uint8

func SliceUint8Delete

func SliceUint8Delete(a []uint8, i int) []uint8

func SliceUint8Equal

func SliceUint8Equal(a, to []uint8) bool

func SliceUint8ExactlyEqual

func SliceUint8ExactlyEqual(a, to []uint8) bool

func SliceUint8Insert

func SliceUint8Insert(a []uint8, what uint8, i int) []uint8

func SliceUint8Pop

func SliceUint8Pop(a []uint8) (uint8, []uint8)

func SliceUint8Push

func SliceUint8Push(a []uint8, x uint8) []uint8

func SliceUintCut

func SliceUintCut(a []uint, i, j int) []uint

func SliceUintDelete

func SliceUintDelete(a []uint, i int) []uint

func SliceUintEqual

func SliceUintEqual(a, to []uint) bool

func SliceUintExactlyEqual

func SliceUintExactlyEqual(a, to []uint) bool

func SliceUintInsert

func SliceUintInsert(a []uint, what uint, i int) []uint

func SliceUintPop

func SliceUintPop(a []uint) (uint, []uint)

func SliceUintPush

func SliceUintPush(a []uint, x uint) []uint

func StringChannelToList

func StringChannelToList(channel <-chan string) (list []string)

read from a channel, wait till its closed and return all read items

func StringListToChannel

func StringListToChannel(list ...string) <-chan string

give back a channel in which to push items of a list of string in a separate goroutine

func StringSliceToByteSlice

func StringSliceToByteSlice(sc ...string) (b [][]byte)

converts non-nested string slice to byte slice

func Uint16ChannelToList

func Uint16ChannelToList(channel <-chan uint16) (list []uint16)

read from a channel, wait till its closed and return all read items

func Uint16ListToChannel

func Uint16ListToChannel(list ...uint16) <-chan uint16

give back a channel in which to push items of a list of uint16 in a separate goroutine

func Uint32ChannelToList

func Uint32ChannelToList(channel <-chan uint32) (list []uint32)

read from a channel, wait till its closed and return all read items

func Uint32ListToChannel

func Uint32ListToChannel(list ...uint32) <-chan uint32

give back a channel in which to push items of a list of uint32 in a separate goroutine

func Uint64ChannelToList

func Uint64ChannelToList(channel <-chan uint64) (list []uint64)

read from a channel, wait till its closed and return all read items

func Uint64ListToChannel

func Uint64ListToChannel(list ...uint64) <-chan uint64

give back a channel in which to push items of a list of uint64 in a separate goroutine

func Uint8ChannelToList

func Uint8ChannelToList(channel <-chan uint8) (list []uint8)

read from a channel, wait till its closed and return all read items

func Uint8ListToChannel

func Uint8ListToChannel(list ...uint8) <-chan uint8

give back a channel in which to push items of a list of uint8 in a separate goroutine

func UintChannelToList

func UintChannelToList(channel <-chan uint) (list []uint)

read from a channel, wait till its closed and return all read items

func UintListToChannel

func UintListToChannel(list ...uint) <-chan uint

give back a channel in which to push items of a list of uint in a separate goroutine

Types

This section is empty.

Jump to

Keyboard shortcuts

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