conv

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HEX  = "0123456789ABCDEF"
	LHEX = "0123456789abcdef"
)

Variables

This section is empty.

Functions

func Bytes2Hex

func Bytes2Hex(src []byte) []byte

BytesToHex transfer binary to hex bytes

func Hex2Bytes

func Hex2Bytes(src []byte) []byte

HexToBytes transfer hex bytes to binary

func Hex2Uint

func Hex2Uint(str string) (uint64, error)

Hex2Uint convert a hexadecimal string to uint if string is invalid, return an error

func IntDef

func IntDef(val string, def int) int

func ReverseBits

func ReverseBits(num uint) uint

ReverseBits reverse all bits in number

func ReverseByte

func ReverseByte(num byte) byte

ReverseByte reverse all bits for a byte

func Uint2Hex

func Uint2Hex(u uint64) []byte

func Uint2LowerHex

func Uint2LowerHex(u uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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