u8

package
v0.0.0-...-d4686d0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distinct

func Distinct(a []uint8) (r []uint8)

Distinct returns a new slice with all duplicate values removed.

func GCD

func GCD(a ...uint8) uint8

GCD returns greatest common divisor

func GCD2

func GCD2(m, n uint8) uint8

GCD2 returns greatest common divisor

func Insert

func Insert(a []uint8, index int, value uint8) []uint8

Insert the value at the index of the slice 0 <= index <= len(a)

func IsValue

func IsValue(buffer []uint8, value uint8) bool

IsValue returns ture if buffer filled with the value, otherwise false.

func IsZero

func IsZero(buffer []uint8) bool

IsZero returns ture for all zero buffer, otherwise false.

func Max

func Max(a ...uint8) uint8

Max returns a maximum of all input arguments

func Max2

func Max2(a, b uint8) uint8

Max2 returns a if a >= b else b

func Memset

func Memset(a []uint8, value uint8)

Memset fills the slice with the value.

func Min

func Min(a ...uint8) uint8

Min returns a minimum of all input arguments

func Min2

func Min2(a, b uint8) uint8

Min2 returns a if a <= b else b

func MinMax

func MinMax(a ...uint8) (uint8, uint8)

MinMax returns a (minimum, maximum) of all input arguments

func MinMax2

func MinMax2(a, b uint8) (uint8, uint8)

MinMax2 returns a (minimum, maximum) of input arguments

func Mul

func Mul(a ...uint8) uint8

Mul returns mul of all input values

func Remove

func Remove(a []uint8, index int) []uint8

Remove the value at the index.

func Reverse

func Reverse(a []uint8)

Reverse the slice in place.

func Sum

func Sum(a ...uint8) uint8

Sum returns sum of all input values

func Thousands

func Thousands(rs []uint8) string

Thousands returns thousands separated by underline e.g.: 1_234_567

func ToHex

func ToHex(buf []byte, countPerLine int) string

ToHex returns countPerLine Hex string of buf content.

Types

This section is empty.

Jump to

Keyboard shortcuts

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